Custom Search

Thursday, March 15, 2007

C - Review II 17-20

17. main(){

int i=0;

for(;i++;printf("%d",i)) ;

printf("%d",i);

}
Output : 1

18. main(){

char *cptr,c;

void *vptr,v;

c=10; v=0;

cptr=&c; vptr=&v;

printf("%c%v",c,v);

}
Output : Error: size of v is unknown


19. main(){

int a= 0;int b = 20;char x =1;char y =10;

if(a,b,x,y)

printf("hello");

}
Output: hello


20. main(){

int i=0;

while(+(+i--)!=0)

i-=i++;

printf("%d",i);

}
Output : -1

No comments: