What will the following program print on screen? int tenure = -10; if (tenure + 5) printf("Congratulations!"); else printf("Sorry");
A. Congratulations!
B. Runtime error.
C. Sorry
D. Nothing; the program will not compile.
查看答案
In a switch statement, if the break statements are omitted, all cases following the matching case value, including the default case, are executed.
A ____ statement is a specialized selection statement that can be used in place of an if-else chain where exact equality to one or more integer constants is required.
A. case
B. break
C. switch
D. nested if
In a switch statement, the keyword ____ identifies the values that will be compared to the value of the switch expression.
A. if
B. break
C. case
D. default
In a switch statement, the word ____ is optional and operates the same as the last else in an if-else chain.
A. if
B. break
C. case
D. default