*char[size] and new char[size]

Hi,
what is the difference between

char *c[size];

and

char *c = new char[size];
Last edited on
char *c[size];
It is an array of pointers to char. It is allocated on the stack. size must be known at compile time.

char *c = new char[size];
It is a pointer to an array of chars. Array is allocated from the heap.

difference between *c[size] and (*c)[size] makes more sense. :)
Thanks Abramus,
for answer.. my doubt is solved..
Topic archived. No new replies allowed.