II-90 Programming Concepts
3. The test condition given within the if, i.e., if(condition) is true, then .
(a) if block executed
(b) else block executed
(c) Both blocks are executed
4. The scope of if() can be defined with .
(a) { } (b) [] (c) ()
5. The keyword else is used with .
(a) if statement (b) switch statement
(c) do..while() statement (d) None of the above
6. The following keyword/statement is used to terminate from the innermost loop .
(a) default (b) break (c) case
7. The following keyword is used for unconditional jump to a labelled statement .
(a) Go (b) goto (c) jump
8. The value specified in the parentheses followed to switch is .
(a) Real (b) Double floating-point number (c) Integer
9. Which warning message will be flagged by the compiler for the following program?
void main() { if(0) printf("1");}
(a) Unreachable code in function main
(a) Constant expression required
(b) Statement missing
10. The if-else and switch statements belong to .
(a) Repetitive structure (b) Sequential structure
(c) Selective structure (d) None of the above
11. The default is a .
(a) Keyword in c (b) Function
(c) Pointer (d) None of the above
12. The keyword switch is followed by .
(a) Switch variable (b) Constant
(c) Float variable (d) goto
13. The default statement can appear .
(a) Anywhere within the switch
(b) At the end of each case
(c) At the end of switch case
14. By mistake if no break statements are given in each case statement, then .
(a) All the cases following it are executed
(b) Statements following to one case executes
(c) None of the above
15. The switch statement is used to .
(a) Switch between functions in a program
(b) Switch from one variable to another variable
M05_ITL-ESL4791_02_SE_C05.indd 90 12/22/2012 4:58:55 PM