Professional Documents
Culture Documents
CW
INT /Ron/ PAGE NO. I. Technical Terms:
T.B
CW 1. Execute
CW 2. Evaluates
CW 3. Default
CW 4. Initialisation
CW 5. Increment
CW 6. Decrement
TB Pg No:33 3. The loop used to execute a set of statements specified number of times is
a. if-else b. while c. do-while d. for
TB Pg No:33 4. The statement to terminate the execution of looping structures is,
a. stop b. break c. terminate d. exit
IV. Compare and Contrast:
Pg No:22
INT T.B.M Pg No:23 1. Compare and contrast if-else and switch statements.
* Condition of if-else should always * Switch case can be written in any way that it compares a given
result either in true or false value with set of predefined values.
Pg No:28
INT T.B.M Pg No:29 2. Compare and contrast break and continue statements.
The switch statement: This switch statement is another type of control statement which will execute one of the many
blocks, based on the given Condition.
If(condition)
Statement executed if condition is true;
Else
Statement executed if condition is false;
If(condition)
Statement executed if condition is true;
Elseif(condition)
Statement executed if condition is true;
else
Statement executed if condition is true;
3. Switch statement:
INT T.B.M Pg No:22
Switch(expression)
{
case value1:
statement1;
break;
case value2:
statement1;
break;
default:
statement;
}
INT T.B.M Pg No:26 4. While loop:
while(condition is true)
{
Statement(s) to be executed;
}