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

Explore more Topics under C Programming

Q81.
What is the output of the code given below?
#include <stdio.h>
    int main()
    {
        printf("%d ", 1);
        goto l1;
        printf("%d ", 2);
        l1:goto l2;
        printf("%d ", 3);
        l2:printf("%d ", 4);
   }
Discuss
Answer: (a).1 4
Q82.
What is the output of code given below?
#include <stdio.h>
    int main()
    {
        printf("%d ", 1);
        l1:l2:
        printf("%d ", 2);
        printf("%d\n", 3);
    }
Discuss
Answer: (b).1 2 3
Q83.
What is the output of code given below?
#include <stdio.h>
    int main()
    {
        printf("%d ", 1);
        goto l1;
        printf("%d ", 2);
    }
    void foo()
    {
        l1 : printf("3 ", 3);
    }
Discuss
Answer: (d).Compilation error
Q84.
What is output of code given below?
#include <stdio.h>
    int main()
    {
        int i = 0, j = 0;
        while (i < 2)
        {
            l1 : i++;
            while (j < 3)
            {
                printf("Loop\n");
                goto l1;
            }
        }
    }
Discuss
Answer: (d).Infinite Loop
Q85.
What is the output of code given below?
#include <stdio.h>
    int main()
    {
        int i = 0, j = 0;
        while (l1: i < 2)
        {
            i++;
            while (j < 3)
            {
                printf("loop\n");
                goto l1;
            }
        }
    }
Discuss
Answer: (b).Compilation error
Q86.
What is the output of the code given below?
#include <stdio.h>
    int main()
    {
        int i = 0, j = 0;
        l1: while (i < 2)
        {
            i++;
            while (j < 3)
            {
                printf("loop\n");
                goto l1;
            }
        }
    }
Discuss
Answer: (a).loop loop
Q87.
The output of the code below is
#include <stdio.h>
    void main()
    {
        int i = 0;
        if (i == 0)
        {
            goto label;
        }
        label: printf("Hello");
    }
Discuss
Answer: (d).Hello
Q88.
The output of the code below is
#include <stdio.h>
    void main()
    {
        int i = 0, k;
        if (i == 0)
            goto label;
            for (k = 0;k < 3; k++)
            {
                printf("hi\n");
                label: k = printf("%03d", i);
            }
    }
Discuss
Answer: (a).0
Q89.
The output of the code below is
#include <stdio.h>
    void main()
    {
        int i = 0, k;
        label: printf("%d", i);
        if (i == 0)
            goto label;
    }
Discuss
Answer: (b).Infinite 0
Q90.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int i = 5, k;
        if (i == 0)
            goto label;
            label: printf("%d", i);
            printf("Hey");
    }
Discuss
Answer: (c).5 Hey

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!