Please refer to Control Flow – Part II Class 11 Computer Science notes and questions with solutions below. These revision notes and important examination questions have been prepared based on the latest Computer Science books for Class 11. You can go through the questions and solutions below which will help you to get better marks in your examinations.
Class 11 Computer Science Control Flow – Part II Notes and Questions
Marks Questions
Question 1 What is the general-syntax of ‘do while’ loop?
Answer
do statement while(expression);
Question 2 What is ‘do while’ loop called?
Answer
Post Test Loop
Question 3 What is ‘while’ loop called?
Answer
Pre-Test Loop
Question 4 What are the minimum no of repetition’s for a ‘while’ loop?
Answer
May not even once or zero times
Question 5 What are the minimum no of repetition’s for a ‘do while’ loop?
Answer
At least one time
Questions from Exercise
Question 1 What are the three different types of expressions in for loop?
Ans: Three types of expressions are used in the for loop which are shown below:
Syntax: for(expression1; expression2;expression3) Example: for(i=1 ; i<=5 ; i++)
{ {
} }
Expression1: It is called initialization Part. It is used to initialize the loop counter variable. For example: i=1;
Expression2: It is called the test-condition Part. It is used to test the condition for the loop. For example: i<=5;
Expression3: It is called Iteration Part. It is used to increment /decrement the loop counter value. For example: i++;
Q:2 When we execute the loop, what will be the minimum no of iterations for the do while loop?
Ans: When we execute a loop, the minimum no of iterations for the do while loop is one because it is a post test
loop. In this loop, body of the ‘do while’ loop is executed first than the test-condition is tested. Therefore, body of
the ‘do while’ loop must exeute at least once, even if the condition becomes false initially.
Q:3 How can we represent the null statement in the loop?
Ans: Loops are the iterative control statements which are used to repeat the set of instructions on the program.
There are three loops – for, while and do-while in C language. In any of these loops, if we want to represent the null
statement, we use semicolon (;) symbol. For example:
for(i=1;i<=5;i++)
{
; // it shows the null statement in loop
}
Q:4 How working of while loop is terminated?
Ans: While loop is a pre-test loop. Its body is executed only if its conditional expression becomes true. If this
conditional-expression evaluates to false, the while loop gets terminated and it will stop repeatition of execution of
it’s body.
We hope the above Control Flow – Part II Class 11 Computer Science are useful for you. If you have any questions then post them in the comments section below. Our teachers will provide you an answer. Also refer to MCQ Questions for Class 11 Computer Science