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 26 of 32

Explore more Topics under C Programming

Q251.
What is the output of this program?
void main()
{
    int x=0;
    for(;;)
    {
        if(x==3)
            break;
        printf("%d ",++x);
    }

}
Discuss
Answer: (a).1 2 3
Q252.
How many times compsciedu will be printed?
#include <stdio.h>
int main()
{
    int i = -5;
    while (i <= 5)
    {
        if (i >= 0)
            break;
        else
        {
            i += 1;
            continue;
        }
        printf("compsciedu");
    }
    return 0;
}
Discuss
Answer: (c).0 times
Q253.
What is the output of this program?

#include <stdio.h>
void main()
{
    int a = 3;
    while (a--)
    {
        int a = 10;
        a--;
        printf("%d ", a);
    }
}
Discuss
Answer: (a).9 9 9
Q254.
Which of the given statment is true about the given code ?
int main()
{
 int i = 0;
 for ( ; i < 5 ; )
 { 
   if (i < 5)
     printf("Hello", i++);
   else
     continue;
   printf("World");
 }
 return 0;
}
Discuss
Answer: (b).It will print helloWorld 5 times
Q255.
How many times value of j is checked in the below code ?
#include 
    int main()
    {
        int j = 0;
        do {
            j++;
            printf("");
        } while (j < 5);
    }

a.

3

b.

4

c.

5

d.

1

Discuss
Answer: (c).5
Q256.
What is the output of the following code?
int main()
{
    int i = 0;
    switch(i)
    {
    case 0 : i++;
    case 1 : i+++2;
    case 2 : ++i;
    }
    pritnf("%d",i++);

    return 0;
}

a.

2

b.

3

c.

4

d.

5

Discuss
Answer: (b).3
Q257.
How many x are printed?
for(i=0,j=10;i < j;i++,j--) 
        printf("x");

a.

10

b.

5

c.

4

d.

6

Discuss
Answer: (b).5
Q258.
How many x are printed?
    for(i=-2,j=5;i < j;i++,j--) 
        printf("x");

a.

10

b.

5

c.

4

d.

6

Discuss
Answer: (c).4
Q259.
What will be the output of the program?
 int a=0,b=2;
 if(a=0) b=0;
 else b*=10;
Discuss
Answer: (b).20
Q260.
What will be the output of the program?
 int a=2,b=2;
 if(a!=0) 
    b=0;
 else 
    b*=10;
 printf("%d",b);
Discuss
Answer: (a).0

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!