Programming in C - Decision Making and Looping

11. Which is true of conditional compilation?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


12. Consider the following program fragment

char c = ' a ';
while ( c++ <= ' z ')
putchar ( xxx );

If the required output is abcdefghijklmnopqrstuvwxyz, then xxx should be

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


13. Choose the statements that are syntactically correct

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


14. The following program fragment
for(i = 3 ; i < 15; i += 3);
printf(" %d ", i);
results in

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


15. The following program fragment
for (i = 1; i< 5; ++ I )
if ( i == 3) continue;
else printf( " %d " i );
results in the printing of

  • Option : B
  • Explanation :
    The use of continue statement forces the execution to skip the remainder of the current pass over the loop and initiates the next. If ' U ' is 3. print f statement will be skipped. Hence the answer is b
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *