The body of the following for loop
for( putchar( 'a' ); putchar (0); putchar (' c ') ) putchar ( 'b') ;
will be executed
A. | 0 times |
B. | 1 times |
C. | infinitely many times |
D. | will not be executed because of syntax error |
Option: A Explanation : The condition is putchar (0) . This returns a value 0 which is a false condition. So, the loop will not be executed even once. Click on Discuss to view users comments. |
The following statement
if (a > b)
if (c > b)
printf("one");
else
if (c == a) printf('two');
else printf("three");
else printf("four");
A. | results in a syntax error |
B. | prints four in c <= b |
C. | prints two if c <= h |
D. | prints four in a <= b |
Option: D Explanation : Click on Discuss to view users comments. |
Code in the previous question can never print
A. | one |
B. | two |
C. | three |
D. | four |
Option: B Explanation : Click on Discuss to view users comments. kambosac said: (6:15pm on Tuesday 8th August 2017)
why it is so
|