12th Class Computer Science Chapter 12 MCQs with Answers

Welcome to the 12th Class Computer Science Chapter 12 MCQs Online Test. We are presenting you with top MCQ questions from the 12th Class Computer Science Chapter Loop Constructors.

We want to tell you that you can find all the 12th Class Computer Science Chapter 12 MCQs online tests on our website. These online tests are great for learning and as well as for scoring maximum marks in your Intermediate Exams. We are making these Class 12 Computer Science MCQs online tests for those who want full marks in their exams. Attempt all these Grade 12 Computer Science Online Multiple Choice Questions MCQs before going for the exam and it will be beneficial for you! These online tests contain all the important multiple choice questions in the important topics of the FSC Part-II  Computer Science Chapter 12 Loop Constructors. 

12th Class Computer Science Chapter 12 MCQs with Answers

Youth For Pakistan has provided an excellent opportunity for the students of the 12th class to prepare their Computer Science Chapter 12 Loop Constructors online with MCQs test.

This is a free platform for students to prepare for Computer Science Exams for Class 12 to get the best accomplishments in annual exams. 12th class Students can analyze themself by attempting this online test system as many times as they want until they find themself fully prepared.

MCQs Class 12 Computer Science with Answers

The purpose of these online MCQs tests is to help you evaluate your 12th Class Computer Science Chapter 12 MCQs. These Multiple Choice Questions (MCQs) will prepare you for your academic success in the 12th Class Exams. 12th Class Computer Science Chapters include Chapter No 1 Data basics, Chapter No 2 Basic Concepts And Terminology, Chapter No 3 Database Design Process, Chapter No 4 Data Integrity & Normalization, Chapter No 5 Introduction of Microsoft Access, Chapter No 6 Table and Query, Chapter No 7 Microsoft Access forms & Reports, Chapter No 8 Getting Started with C, Chapter No 9 Element Of C, Chapter No 10 Input/Output, Chapter No 11 Decision Constructors, Chapter No 12 Loop Constructors, Chapter No 13 Functions and Chapter No 14 File Handling in C

What Loop Constructors?

Looping constructs are used when the same set of steps has to be carried out many times. There is usually a counter that indicates how many times the loop is executed or a test that is made every time the loop is executed to see if it should be executed again.

Chapter No 12 Loop Constructors

1. How many types of loop structures are in C choose which one is correct?

  1. 3
  2. 2
  3. 4
  4. 5

2. is a loop statement choose which one is correct:

  1. if
  2. while
  3. if-else
  4. switch

3. The loop which never ends is called choose which one is correct:

  1. for loop
  2. nested loop
  3. infinite loop
  4. All

4. loop structures are available in C language choose which one is correct:

  1. do-while
  2. while
  3. for
  4. All of these

5. is called counter loop choose which one is correct:

  1. do-while
  2. while
  3. for
  4. Both (a) & (b)

6. Which one is not a loop structure

  1. switch
  2. for
  3. while
  4. do-while

7. A variable whose value controls the number of iterations is known as _________.

  1. Variable
  2. Control Variable
  3. Loop Variable
  4. Loop Control Variable

8. In while loop, the loop control variable always initialized _________.

  1. Before the loop starts
  2. Inside the loop body
  3. After the loop ends
  4. Outside the program

9. In while loop, the increment / decrement statement are placed _________.

  1. Before the loop starts
  2. Inside the loop body
  3. After the loop ends
  4. Outside the program

10. structure executes the body of loop at least once choose which one is correct:

  1. do-while
  2. while
  3. for
  4. None

11. The body of loop comes after the test condition in choose which one is correct:

  1. do-while
  2. while
  3. for
  4. Both (b) and (c)

12. The while loop is also called choose which one is correct:

  1. conditional loop
  2. wend loop
  3. counter loop
  4. Attribute

13. The body of loop comes before the test condition in choose which one is correct:

  1. do-while
  2. while
  3. for
  4. None

14. Semicolon is placed at the end of condition in choose which one is correct:

  1. while loop
  2. do-while loop
  3. switch
  4. All of these

15. The do-while loop ends with a ____

  1. }
  2. )
  3. ,
  4. ;

16. The _____ loop will execute at least even the condition is false

  1. while
  2. do-while
  3. for
  4. All of above

17. The _____________ of for loop executed only once in the first iteration

  1. Loop condition
  2. Increment / decrement
  3. Initialization expression
  4. All of above

18. is related to loop structures choose which one is correct:

  1. Body of loop
  2. Loop control variable
  3. Condition
  4. All of these

19. structure is used when programmer does not know is advance the number of repetition of loop choose which one is correct?

  1. do-while
  2. for
  3. while
  4. Both (a) and (c)

20. Loop with in a loop is called

  1. Loops
  2. Multiple Loops
  3. Many Loops
  4. Nested Loops

21. What is the final value of x when the code int x; for(x=0;x<10;x++)} is run

  1. 10
  2. 9
  3. 1
  4. 0

22. Examine the following code and tell output int count=1; while(count<5) printf(“%d”,count); }

  1. 1234
  2. 12345
  3. 111111…..
  4. 234

23. Examine the following code and tell output int count=-2; while(count<3) printf(“%d”,count); count+ = 1;}

  1. -2-11234
  2. -2-1123
  3. -3-4-5-6-7
  4. -2-1012

24. One execution of the body of loop is called choose which one is correct:

  1. iteration
  2. duration
  3. cycle
  4. Text

25. What will be the value of ‘x’ after executing for(x=1 ; x<15;x++); choose which one is correct?

  1. 14
  2. 1
  3. 16
  4. 15

26. How many times does the loop get iterated choose which one is correct?

for(i=0;i=10;i+=2) printf(“Hi\\n”);

  1. 10
  2. 2
  3. 5
  4. None of Above

27. In a group of nested loops, which loop is executed the most number of times choose which one is correct?

  1. The outermost loop
  2. The innermost loop
  3. All loops at the same number of times
  4. Cannot be determined

28. What will be value of c after the execution of following statements choose which one is correct? c=-8; doc++;}while(c>=5);

  1. -8
  2. -6
  3. -7
  4. -9

29. is used to move the control to the start of loop body choose which one is correct:

  1. continue
  2. break
  3. switch
  4. None

30. can be used to terminate the loop choose which one is correct: choose which one is correct:

  1. terminate
  2. break
  3. stop
  4. exit

31. A special value that terminates the loop is called choose which one is correct:

  1. terminate value
  2. sentinel value
  3. control value
  4. end value

32. The for loop contains three expressions choose which one is correct: initialization, test, and choose which one is correct:

  1. Character
  2. Float
  3. increment/decrement
  4. All

33. What will be the output of following code choose which one is correct?

int x=5,c=0; If(x%2==1)for(;c<=5;c++) printf(“%d”,c);}

  1. 0123456
  2. 012345
  3. 6
  4. Error Message

34. Which for loop will counts from 0 to 5 choose which one is correct?

  1. for(int c=0; c<=6;c++)
  2. for(c=0; c<5; c++);
  3. for(c=0; c<=5; c++)
  4. for(int c=0; c<7; c++)

35. What will be the value of ‘x’ after executing the following code choose which one is correct?

int x = 5;

while (++x > 5)

break;

printf(“%d”,x);

  1. 5
  2. 6
  3. 0
  4. None

36. What will be the output of the following code segment choose which one is correct?

int n = 5;

while (n > 5)

n * = 10;

printf(“%d”, n );

  1. 5
  2. 10
  3. 50
  4. 0

37. What will be the output of the following code segment choose which one is correct?

int m = 10, n = 100;

do

 

m = m + (n ++);

m ++ ;

}while (m < 10);

printf(“%d”, m );

  1. 10
  2. 110
  3. 111
  4. 112

38. What will be the output of the following code segment choose which one is correct?

int x = 0;

for (x = 100; x = = 200; x ++);

printf(“%d”, x );

  1. 101
  2. 100
  3. 201
  4. 200

39. What will be the output of the following code segment choose which one is correct?

int n = 0

for (;;)

 

if (n = = 10) break;

n++;

}

printf(“%d”, n );

  1. 0
  2. 10
  3. 11
  4. 12

40. What is the final value of x when the code intx; for(x=0; x<10; x++) is run choose which one is correct?

  1. 10
  2. 9
  3. 0
  4. 1

Leave a Comment