C Programming - Pointers - Discussion
Discussion Forum : Pointers - Point Out Correct Statements (Q.No. 6)
6.
Which of the statements is correct about the program?
#include<stdio.h>
int main()
{
int arr[3][3] = {1, 2, 3, 4};
printf("%d\n", *(*(*(arr))));
return 0;
}
Discussion:
27 comments Page 2 of 3.
@Singh said:
1 decade ago
9 element should be present their is only 4 other value can be assign as 0 or garbage value.
Wikiok said:
1 decade ago
Error: ***arr == arr[0][0][0], but arr has only 2 dimension.
Coder x said:
8 years ago
We use triple for a 3d array but arr[3][3] is a 2d array.
Diya said:
9 years ago
Thanks to all for the clear explanation.
Vijay said:
1 decade ago
@Wikiok.
Hai you said very well.
Hai you said very well.
Srikanth said:
9 years ago
Now I get it. Thanks to all.
Sang said:
1 decade ago
How to told error is found ?
Inderpal said:
1 decade ago
@ WIKIOK right answer.....
Chaw said:
1 decade ago
Why use *** arr?
Santhosh said:
9 years ago
Thanks @Praful.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers