adplus-dvertising

Welcome to the Control Flow Statements in C MCQs Page

Dive deep into the fascinating world of Control Flow Statements in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Control Flow Statements in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Control Flow Statements in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Control Flow Statements in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Control Flow Statements in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Control Flow Statements in C MCQs | Page 12 of 32

Explore more Topics under C Programming

Q111.
What will be the output of the following piece of code?
for(i = 0; i<10; i++);
printf("%d", i);
Discuss
Answer: (a).10
Q112.
What will be the output of the following code?
#include
void main()
{
    int s=0;
    while(s++<10)
    {
        if(s<4 && s<9)
        continue;
        printf("%dt", s);
    }
}
Discuss
Answer: (c).4 5 6 7 8 9 10
Q113.
Which command is used to skip the rest of a loop and carry on from the top of the loop again?
Discuss
Answer: (c).continue
Q114.
What is the output of the following program?
#include<stdio.h>
int c[10] = {1,2,3,4,5,6,7,8,9,10};   
main()
{
   int a, b=0;
   for(a=0;a<10;++a)
      if(c[a]%2 == 1)
         b+=c[a];
   printf("%d", b);
}
Discuss
Answer: (c).25
Q115.
What is the output of the following statements?
for(i=10; i++; i<15)
   printf("%d ", i);
Discuss
Answer: (d).Infinite loop
Q116.
The type of the controlling expression of a switch statement cannot be of the type ........
Discuss
Answer: (d).float
Discuss
Answer: (d).The commas should be semicolons
Q118.
Find the output of the following program.
#include<stdio.h>
void main()
{
   int y=10;
   if(y++>9 && y++!=10 && y++>11)
      printf("%d", y);
   else
      printf("%d", y);
}
Discuss
Answer: (c).13
Q119.
What will be the value of sum after the following program is executed?
void main()
{
   int sum=1, index = 9;
   do{
      index = index โ€“ 1;
      sum *= 2;
   }while( index > 9 );
}
Discuss
Answer: (b).2
Q120.
What is the right choice, if the following loop is implemented?
void main()
{
   int num = 0;
   do{
      --num;
      printf("%d", num);
   }while( ++num >= 0 );
}
Discuss
Answer: (d).The loop will run infinitely many times

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!