Google
 
Webcprogramming.com




An Affiliate of AIHorizon




Lesson 5: switch case

If you didn't do as well as you like, be sure to read through Cprogramming.com's tutorial on Switch..Case. Otherwise, congratulations!

1. Which follows the case statement?
A. :
B. ;
C. -
D. A newline

2. What is required to avoid falling through from one case to the next?
A. end;
B. break;
C. Stop;
D. A semicolon.

3. What keyword covers unhandled possibilities?
A. all
B. contingency
C. default
D. other

4. What is the result of the following code?
x=0;
switch(x)
{
case 1: printf( "One" );
case 0: printf( "Zero" );
case 2: printf( "Hello World" );
}
A. One
B. Zero
C. Hello World
D. ZeroHello World


Quiz

-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.

Geodesy Designs