Elearning , Interview Questions And Answers

Google

7)main() { char str1[]="HELLO"; char str2[]="HELLO"; if(str1==str2) printf("EQUAL"); else printf("NOT EQUAL"); } Ans: NOT EQUAL Since string can be compared only using strcmp() 8)main(int argc) { int a; printf("%d",a); } 9) How to declare argc and argv ans: main(int argc,char* argv[]) 10)main() { int s=5; printf("%d",s,s<<2,s>>2); } ans:5 20 1 11)main() { int a[2][2]={2,3} printf("%d%d%d%d",a[0][0],a[0][1],a[1][0],a[1][1]}; } a)2000 b)0002 c)2300 d)error ans: 2300


Hosted by www.Geocities.ws

1