int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} };

int *p,*q;





#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,..

Answer / susie

Answer :



p=&a[2][2][2] you declare only two 2D arrays. but you are
trying to access the third 2D(which you are not declared) it
will print garbage values. *q=***a starting address of a is
assigned integer pointer. now q is pointing to starting
address of a.if you print *q meAnswer:it will print first
element of 3D array.

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More C Code Interview Questions

Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  

main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }

1 Answers  

void main() { int i=5; printf("%d",i+++++i); }

3 Answers  

what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }

10 Answers  

How we print the table of 2 using for loop in c programing?

14 Answers   Wipro, HCL,

main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  

Print an integer using only putchar. Try doing it without using extra storage.

2 Answers  

Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?

2 Answers  

main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  

write a c-program to display the time using FOR loop

3 Answers   HCL,

Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

1 Answers  

#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); }

1 Answers   TCS,