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 function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
How to palindrom string in c language?
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
find simple interest & compund interest
main() { char a[4]="HELLO"; printf("%s",a); }
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
Develop a routine to reflect an object about an arbitrarily selected plane
main() { char a[4]="HELL"; printf("%s",a); }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }