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

Explore more Topics under C Programming

Q41.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int k = 0;
        for (k)
            printf("Hello");
    }
Discuss
Answer: (a).Compile time error
Q42.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int k = 0;
        for (k < 3; k++)
        printf("Hello");
    }
Discuss
Answer: (a).Compile time error
Q43.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        double k = 0;
        for (k = 0.0; k < 3.0; k++)
            printf("Hello");
    }
Discuss
Answer: (b).Hello is printed thrice
Q44.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        double k = 0;
        for (k = 0.0; k < 3.0; k++);
            printf("%lf", k);
    }
Discuss
Answer: (c).3.000000
Q45.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int k;
        for (k = -3; k < -5; k++)
            printf("Hello");
    }
Discuss
Answer: (d).Nothing
Q46.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0;
        for (; ; ;)
            printf("In for loop\n");
            printf("After loop\n");
    }
Discuss
Answer: (a).Compile time error
Q47.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0;
        for (i++; i == 1; i = 2)
            printf("In for loop ");
            printf("After loop\n");
    }
Discuss
Answer: (a).In for loop after loop
Q48.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int i = 0;
        for (foo(); i == 1; i = 2)
            printf("In for loop\n");
            printf("After loop\n");
    }
    int foo()
    {
        return 1;
    }
Discuss
Answer: (a).After loop
Q49.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int *p = NULL;
        for (foo(); p; p = 0)
            printf("In for loop\n");
            printf("After loop\n");
    }
Discuss
Answer: (b).Compile time error
Q50.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        for (int i = 0;i < 1; i++)
            printf("In for loop\n");
    }
Discuss
Answer: (c).Depends on the standard compiler implements

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!