Is it possible to declare an array with a variable as its index value, so that the user himself/herself can enter the exact number of items required....??
> Yes, it is possible but it is not recommended. Why? > It is better to have dynamically allocated array in this case. Again, why? Please assume that the compiler supports C99, since the obvious "it's not portable" prior to C99 is obvious. > `int *array = malloc(i*sizeof(int)); // alloc … Read More
Edited by Moschops
Edited by rustysynate
Edited by deceptikon