main( )
{
int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}};
printf(“%u %u %u %d \n”,a,*a,**a,***a);
printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
100, 100, 100, 2
114, 104, 102, 3
Explanation:
The given array is a 3-D one. It can also be viewed as a
1-D array.
2
4
7
8
3
4
2
2
2
3
3
4
100 102 104 106 108 110 112 114 116 118
120 122
thus, for the first printf statement a, *a, **a give
address of first element . since the indirection ***a gives
the value. Hence, the first line of the output.
for the second printf a+1 increases in the third dimension
thus points to value at 114, *a+1 increments in second
dimension thus points to 104, **a +1 increments the first
dimension thus points to 102 and ***a+1 first gets the value
at first location and then increments it by 1. Hence, the
output.
Is This Answer Correct ? | 11 Yes | 16 No |
Write a program that reads a dynamic array of 40 integers and displays only even integers
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
void ( * abc( int, void ( *def) () ) ) ();
Cluster head selection in Wireless Sensor Network using C programming language.
Write a C function to search a number in the given list of numbers. donot use printf and scanf
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
To reverse an entire text file into another text file.... get d file names in cmd line
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
What is full form of PEPSI
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
why is printf("%d %d %d",i++,--i,i--);
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }