Well, arrays in c are not really much more than a pointer to the first element of it. There is no bounds checking at all. So using arrays is actually working with pointers. You can use malloc to allocate memory for a variable size array.
Code:
unsigned int array_size;
A_NICE_TYPE *myarray;
/*...*/
scanf("%u",&array_size);
myarray = malloc(sizeof(A_NICE_TYPE)*array_size);
if(myarray == NULL)
{
/*out of mem*/
}
/*have fun with your array*/
free(myarray);
You can access the array just like every normal array.
myarray[0] does the same as *myarray
and don't forget the free
