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

Q31.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        switch (printf("Do"))
        {
        case 1:
            printf("First\n");
            break;
        case 2:
            printf("Second\n");
            break;
        default:
            printf("Default\n");
            break;
        }
    }
Discuss
Answer: (c).DoSecond
Q32.
Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        int a = 1;
        switch (a)
        case 1:
            printf("%d", a);
        case 2:
            printf("%d", a);
        case 3:
            printf("%d", a);
        default:
            printf("%d", a);
    }
Discuss
Answer: (d).Compile time error, case label outside switch statement
Q33.
Switch statement accepts
Discuss
Answer: (d).all of the mentioned
Q34.
Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        int a = 1;
        switch (a)
        {
        case a:
            printf("Case A ");
        default:
            printf("Default");
        }
    }
Discuss
Answer: (d).Compile time error
Discuss
Answer: (c).if (ch == ‘a’ || ch == ‘A’) printf(“true”);
Q36.
The following code ‘for(;;)’ represents an infinite loop. It can be terminated by
Discuss
Answer: (b).break statement in C
Discuss
Answer: (b).for (i = 0, j = 0;i < n, j < n; i++, j += 5)
Q38.
Which for loop has range of similar indexes of ‘i’ used in for (i = 0;i < n; i++)?
Discuss
Answer: (d).for (i = n-1; i>-1; i–)
Q39.
Which of the following cannot be used as LHS of the expression in for (exp1;exp2; exp3) ?
Discuss
Answer: (d).macros
Discuss
Answer: (c).Numbers will be displayed until the signed limit of short and program will successfully terminate
Page 4 of 32

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!