|
Related Questions |
View Answer |
|
68) int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }
|
View Answer
|
|
67) #define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
|
View Answer
|
|
66) main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
|
if( (y%4==0 && y%100 != 0 - JCL Interview Questions & Answers">
View Answer
|
|
65) main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
64) #define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE");
|
View Answer
|
|
63) main() { char not; not=!2; printf("%d",not); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
62) main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
|
char str2[]="abcd"; printf("%d %d %d",sizeof(str1),s - JCL Interview Questions & Answers">
View Answer
|
|
61) main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }
|
View Answer
|
|
main() { main(); }
|
View Answer
|
|
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF)
|
View Answer
|
|
58) main() { char name[10],s[12]; scanf(" "%[^"]"",s); } How scanf will execute?
|
} How scanf will execute - JCL Interview Questions & Answers">
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
|
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
|