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

Explore more Topics under C Programming

Q71.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int i = 0, j = 0;
        for (i = 0;i < 5; i++)
        {
            for (j = 0;j < 4; j++)
            {
                if (i > 1)
                    break;
            }
            printf("Hi \n");
        }
    }
Discuss
Answer: (a).Hi is printed 5 times
Q72.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int i = 0;
        int j = 0;
        for (i = 0;i < 5; i++)
        {
            for (j = 0;j < 4; j++)
            {
                if (i > 1)
                    continue;
                    printf("Hi \n");
            }
        }
    }
Discuss
Answer: (b).Hi is printed 8 times
Q73.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int i = 0;
        for (i = 0;i < 5; i++)
            if (i < 4)
            {
                printf("Hello");
                break;
            }
    }
Discuss
Answer: (c).Hello
Q74.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int i = 0;
        if (i == 0)
        {
            printf("Hello");
            continue;
        }
    }
Discuss
Answer: (d).Compile time error
Q75.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int i = 0;
        if (i == 0)
        {
            printf("Hello");
            break;
        }
    }
Discuss
Answer: (d).Compile time error
Q76.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0;
        do
        {
            i++;
            if (i == 2)
                continue;
                printf("In while loop ");
        } while (i < 2);
        printf("%d\n", i);
    }
Discuss
Answer: (a).In while loop 2
Q77.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0, j = 0;
        for (i; i < 2; i++){
            for (j = 0; j < 3; j++){
                printf("1\n");
                break;
            }
            printf("2\n");
        }
        printf("after loop\n");
    }
Discuss
Answer: (c).1 2 1 2 after loop
Q78.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0;
        while (i < 2)
        {
            if (i == 1)
                break;
                i++;
                if (i == 1)
                    continue;
                    printf("In while loop\n");
        }
        printf("After loop\n");
    }
Discuss
Answer: (b).After loop
Q79.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0;
        char c = 'a';
        while (i < 2){
            i++;
            switch (c) {
            case 'a':
                printf("%c ", c);
                break;
                break;
            }
        }
        printf("after loop\n");
    }
Discuss
Answer: (b).a a after loop
Q80.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        printf("before continue ");
        continue;
        printf("after continue\n");
    }
Discuss
Answer: (d).Compile time error

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!