Elearning , Interview Questions And Answers

Google

{ char a[]=abcdefghijklmnopqrstuvwxyz; char *p=a; printf(%d,strlen(p)); p+=10; printf(%d,strlen(a)); } a.26 26 b.26 16 c.compilation error d.16 26 ans:a 26. if a file contains the IT solutions Inc.rn then on reading this line the array str using fgets() what would str contain? a. IT solutions Inc. b. IT solutions Inc.r0 c. IT solutions Inc.rn0 d. IT solutions Inc.n0 27. if the following program (myprog)is run from the command line as myprog 1 2 3 what would be the output? Main(int argc , char *argv[]) { int I ,j=0; for (I=0;I<argc;I++) j=j+atoi(argv[i]); printf(%d.j); } a. 123 b.6 c.error d.123 ans:6 28. when pointers declared initialized to : a. null b.newly allocated memory c)nothing,its random d)none of the above ans:c 29. what is the output of the following code? #include<stdio.h> void main() { printf("%d",printf(" hello world ")); }


Hosted by www.Geocities.ws

1