MABS Institution
11th Computer Science Monthly Test -2 ( Flow of Control )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Write the syntax of if statement.
-
Write a program to find sum of first 10 natural numbers.
-
Convert the following if-else to a single conditional statement:
if (x >= 10)
a = m + 5;
else
a = m; -
Write the syntax of nested ·switch statement.
-
What do you know about switch statement?
-
-
Rewrite the following code so that it is functional:
v = 5;
do;
{
total += v;
cout << total;
while v <= 10 -
Write the syntax and purpose of switch statement.
-
-
Differentiate break and continue statement
-
Write a short program to print following series:
(a) 1 4 7 10...... 40 -
Write the rules following while using switch-case in C++.
-
Draw the flowchart that shows the working procedure of.
(i) if nested inside if part
(ii) if nested inside else part
(iii) if nested inside both if part and else part -
Explain about jump statements
-
Write a program to find the LCM and GDC of two numbers.
-
Write the syntax of if nested inside both if part and else part
-
Programs to produce the following design using nested loops
-
Explain for loop with an example.