#include<stdio.h>
main()
{
int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} };
int *p,*q;
p=&a[2][2][2];
*q=***a;
printf("%d..%d",*p,*q);
}
Answer / susie
Answer :
garbagevalue..1
Explanation:
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 ? | 10 Yes | 1 No |
main() { extern int i; i=20; printf("%d",sizeof(i)); }
What is "far" and "near" pointers in "c"...?
C program to print magic square of order n where n > 3 and n is odd
#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); }
Find your day from your DOB?
15 Answers Accenture, Microsoft,
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
main() { extern out; printf("%d", out); } int out=100;
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
func(a,b) int a,b; { return( a= (a==b) ); } main() { int process(),func(); printf("The value of process is %d !\n ",process(func,3,6)); } process(pf,val1,val2) int (*pf) (); int val1,val2; { return((*pf) (val1,val2)); }
what is variable length argument list?
Print an integer using only putchar. Try doing it without using extra storage.
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);