You are on page 1of 10
419122, 451 PM C1 Quiz (ath Feb.) C1 Quiz (6th Feb.) Total points e The respondent's email (jit2021242@i !a.ac.in) was recorded on submission of this form, Enrollment Number * 172021242 1. Whats the output of the following? " int main(){ int x=705; if (x%2=3) printf ("Deciduous!"); else printf("Far away!" return Q; } © Deciduous © Faraway © Runtime error © Compile time error v hitpssidocs google. comarmsidlelFAlpOL S0KTo1ERSIRFseCCPbzT2Ya}oBZCRSBYDnIgOT47RhwkxSoCMviewscorehy_submission=Chkla7... 1/10 419122, 451 PM C1 Quiz (ath Feb.) X_ 2. What is printed by the following? on int main(){ int x=0; for ( 5x<35x++) 5 printf("%d",x)35 return 0; } O2 O3 @© 12 x © 0123 Correct answer @3 3. How many times the loop will run and what is printed by the following? 1/1 int main(){ int a=1,b= for (printf("%d", a) 3a; printf("%d",b)) a=b++<=33 return 0; z CO 3itimes, 1234 © 3times, 2345 O Atimes, 11234 © 4 times, 12345 v hitpssidocs.goole.comarmsidlelFAlpOL SOKTo1ERSIRFseCCPbzT2Ya}oBZCRSBYDnIgOT47JRhwkxSoQMviewscorehy_submission=Chkla7... 2/10 419122, 451 PM C1 Quiz (ath Feb.) X_ 4. What is the outcome of the following? o/1 int main(){ int a=1,b; a>=0?b=1: b=2; printf("%d",b) 5; return @; Compile time error Prints b as 1 with a warning ©oo Prints b as 1 x O Prints bas 2 Correct answer © Compile time error hitpsidocs google. comarmsidlelFAlpOLS0KTo ERSIRFseCCPbzT2¥a)oBZCRSBYDnIg0T47 JRhwkxSoGiviewscore%hy_submission=Chilz7 ano 419122, 451 PM C1 Quiz (ath Feb.) X__ 5. What will be printed by the following? on int main(){ int af] = {7,2,19,31},i,5,ks +ta[1]5 j = a[i]+43 k = a[it+]; printf ("%d,%d,%d",i,5,k)3 return 0; } © 4219 O 3220 © 4331 © 3331 x Correct answer © 43,31 hitpssidocs google. comarmsidlelFAlpOL S0KTo1ERSIRFseCCPbzT2Ya}oBZCRSBYDnIgOT47RhwkxSoCMviewscorehy_submission=Chkla7... 4/10 419122, 451 PM C1 Quiz (ath Feb.) Y 6.What will be printed by the following? wm int main(){ char a[] rone” ; char b[]="Chrome"; printf("%s",strcpy(a,strcat(a,b)))5; return 0; Compile time error in printf Oo0o@0 ™~ DroneChrome v DroneDroneChrome ChromeChrome Y_ 7.What will be the value of iin the following? " int main(){ int i; char x[10],y[10]; gets(x)5 gets(y); i=strcmp(x,y)5 printf("%d",i)5 return Q; } Oo Oi Oa © Unexpected result v tps sidocs.goople.comarmsidlelFAlpOL S0KTo1ERSIRFseCCPbzT2Ya)oBZCRSBYDnIgOT47RhwkxSoQMviewscorehy_submission=Chkla7.... §/10 419122, 451 PM C1 Quiz (ath Feb.) X 8. What is value of r in the following calculation? on float x[]={1.3,9.52,0.001}; int r=sizeof(x)/sizeof(x[2]+x[3])3 O3 O2 © expression syntax error x © denominator error Correct answer @©3 _9.What does the printf() statement print? mM int main(){ int x,y,z,t; X=Y=2=03; tat4x| |++y&&t+4+z5 printf ("%d%d%d%d" x,y,z, t)5 return 0; } Own O 101 © 1001 v Om hitpssidocs google. comarmsidlelFAlpOL SOKTo1ERSIRFseCCPbzT2Ya}oBZCRSBYDnIgOT47RhwkxSoQMviewscorehy_submission=Chkla7... 6/10 419122, 451 PM C1 Quiz (ath Feb.) X_ 10. What happens to the following? oft int main(){ float u=0.333333,v=1/3; if(u>v) printf("u is Greater"); elseif(u

You might also like