C Programming - Pointers - Discussion
Discussion Forum : Pointers - True / False Questions (Q.No. 4)
4.
Are the three declarations char **apple, char *apple[], and char apple[][] same?
Discussion:
43 comments Page 5 of 5.
Sanat said:
1 decade ago
The functionality are same.It simply uses different terms.
Rupinderjit said:
1 decade ago
#1:t's pointer to pointer to variable,that is,it points to another pointer which further points to variable apple's address.
#2:It's array of pointers(uninitialized),usually used to hold number of strings,that is,it is pointer to array of strings.
#3:It is simply array declaration and variable name array is pointer to first element of itself.
#2:It's array of pointers(uninitialized),usually used to hold number of strings,that is,it is pointer to array of strings.
#3:It is simply array declaration and variable name array is pointer to first element of itself.
Mrutyunjay said:
1 decade ago
char **apple - Pointer to pointer to a character
char *apple[] - An array of pointer to a character
char apple[][]- It is 2 dimensional array
char *apple[] - An array of pointer to a character
char apple[][]- It is 2 dimensional array
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers