Posts

C Quiz Part-II

1. What will be the output of the following c code? #include <stdio.h> extern int x; int main(){     do {         do {              printf( "The value of x is: %o" ,x);          }          while (!-2);     }     while (0);     return 0; } int x=8; Output : The value of x is 10   Explanation    What is extern Type ?   What is %o ? (2) What will be output of following c code?          #include <stdio.h> int main(){     int i=2,j=2;     while (i+1?--i:j++)          printf( "%d" ,i);     return 0; } Explanation (3) What will be output of following c code? #include <stdio.h> int main(){     int x=011,i;     for (i=0;i<x;i+=3){          printf( "Start " );          continue ;          printf( "End" );     }     return 0; } Explanation (4)What will be output of following c code? #include <stdio.h