C Aptitude 2
C Aptitude 2
1
14. main(){int i=10; i=!i>14;
Printf ("i=%d",i);}Answer:
15. #include<stdio.h>
main(){char s[]={'a','b','c','\n','c','\0'};
char *p,*str,*str1; p=&s[3]; str=p; str1=s;
printf("%d",++*p + ++*str1-32);}Answer:
16. #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:
17. #include<stdio.h>
main(){ struct xx { int x=3; char name[]="hello"; };
struct xx *s; printf("%d",s->x); printf("%s",s->name);}
Answer:
18. #include<stdio.h>
main(){struct xx{ int x; struct yy{ char s; struct xx *p;};
struct yy *q;}; }Answer: