|
Related Questions |
View Answer |
|
56) What are the files which are automatically opened when a C file is executed? Answer: stdin, stdout, stderr (standard input,standard output,standard error).
|
View Answer
|
|
55) main() { int i=-1; +i; printf("i = %d, +i = %d
",i,+i); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
54) int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
|
View Answer
|
|
53) main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s
”,x); x++; } }
|
View Answer
|
|
52) main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }
|
View Answer
|
|
51) main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
|
View Answer
|
|
50) main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
|
View Answer
|
|
49) main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“
%d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“
%d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“
%d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“
%d %d %d”, ptr-p, *ptr-a, **ptr); }
|
View Answer
|
|
48) main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
|
View Answer
|
|
47) main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(“%u %u %u %d
”,a,*a,**a,***a); printf(“%u %u %u %d
”,a+1,*a+1,**a+1,***a+1); }
|
View Answer
|
|
46) main() { show(); } void show() { printf("I'm the greatest"); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
45) main() { extern out; printf("%d", out); } int out=100;
|
} int out=100; - JCL Interview Questions & Answers">
View Answer
|
|
44) main() { printf("%d", out); } int out=100;
|
} int out=100; - JCL Interview Questions & Answers">
View Answer
|
|
43) main() { extern int i; i=20; printf("%d",sizeof(i)); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
42) #include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
|
View Answer
|
|
41) #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); }
|
View Answer
|
|
40) #include<stdio.h> main() { char s[]={'a','b','c','
','c','
|
View Answer
|
|
39) main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
|
printf("%d",i); } - JCL Interview Questions & Answers">
View Answer
|
|
38) #define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
37) main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
|
}
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All JCL Interview Questions & Answers - Exam Mode /
Learning Mode
|