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 3 of 5.
Abhi said:
7 years ago
1 and 2 are same but 3 are 2D array.
Kodi said:
3 years ago
Yes, exactly it is the correct explanation.
char **apple - It is a double pointer,
char *apple[] -It is an array of pointers,
char apple[][]-It id 2-d array.
char **apple - It is a double pointer,
char *apple[] -It is an array of pointers,
char apple[][]-It id 2-d array.
Pratik Patel said:
1 decade ago
Hey can you tell me whats diff bet array of pointer and pointer of array?
Please reply.
Please reply.
Prasanna said:
1 decade ago
Ya correct pooja.
Sanju said:
1 decade ago
I agree both of you.
Debraj said:
1 decade ago
Pooja is correct.
VIkash Kumar Choubey said:
1 decade ago
Pooja is right but, in my point of view **apple & *apple[] are same.
Puneet said:
1 decade ago
Yes pooja is correct.
Bincy said:
1 decade ago
I too agree with vikash.
Anu said:
1 decade ago
Yes I agree with Vikash.
For eg:
if a[i][j]=*(*(a+i)) then apple[][]=*(apple[])=*(*apple)) i think ..
For eg:
if a[i][j]=*(*(a+i)) then apple[][]=*(apple[])=*(*apple)) i think ..
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers