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 1 of 5.
Pooja said:
2 decades ago
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 an array of pointers
char apple[][]-It id 2-d array.
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 ..
Vinay said:
1 decade ago
No
a[i][j]=*(*(a+i)+j)
a[i][j]=*(*(a+i)+j)
Laxmi said:
1 decade ago
2 is pointer array & 1,3 are same.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers