Hi all,
This is something very basic i know. I just wanted to avoid some confusion.
What is the difference between char *names[100]; and char names[100];
This is what i know
char names[100]; - its just a character array which can hold 99 characters and the last one will be '/0'
char *names[100]; - All the 100 array elements are character pointers and are pointing to the starting element of 100 names somewhere in the memory location.
Am i correct?
if so, in the second case (pointer version), if i want to print all those names cout<<*names[i] where i iterate from 0 to 99 will work?