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

Q311.
What is the output of C Program with switch statement or block?
int main()
{
    static int a=5;
    
    switch(a)
    {
        case 0: printf("ZERO ");break;
        case 5: printf("FIVE ");break;
        case 10: printf("DEER ");
    }
    
    printf("LION");
}
Discuss
Answer: (c).FIVE LION
Q312.
What is the output of C program with switch statement or block?
int main()
{
    char code='K';
    
    switch(code)
    {
        case 'A': printf("ANT ");break;
        case 'K': printf("KING "); break;
        default: printf("NOKING");
    }
    
    printf("PALACE");
}
Discuss
Answer: (a).KING PALACE
Q313.
What is the output of C Program with switch statement or block?
int main()
{
    char code='K';
    
    switch(code)
    {
        case "A": printf("ANT ");break;
        case "K": printf("KING "); break;
        default: printf("NOKING");
    }
    
    printf("PALACE");
}
Discuss
Answer: (d).Compiler error
Q314.
What is the output of C Program with switch statementor block?
int main()
{
    char code='A';
    
    switch(code)
    {
        case 64+1: printf("ANT ");break;
        case 8*8+4: printf("KING "); break;
        default: printf("NOKING");
    }
    
    printf("PALACE");
}
Discuss
Answer: (c).ANT PALACE
Q315.
What is the output of C Program with switch statement or block?
int main()
{
    char code=64;
    
    switch(code)
    {
        case 64: printf("SHIP ");break;
        case 8*8: printf("BOAT "); break;
        default: printf("PETROL");
    }
    
    printf("CHILLY");
}
Discuss
Answer: (d).Compiler error
Q316.
What is the output of C Program with switch statement or block?
int main()
{
    int k=64;
    
    switch(k)
    {
        case k<64: printf("SHIP ");break;
        case k>=64: printf("BOAT "); break;
        default: printf("PETROL");
    }
    
    printf("CHILLY");
}
Discuss
Answer: (d).Compiler error
Q317.
What is the output of C Program with switch statement or block?
int main()
{
    int k=8;
    
    switch(k)
    {
        case 1==8: printf("ROSE ");break;
        case 1 && 2: printf("JASMINE "); break;
        default: printf("FLOWER ");
    }
    
    printf("GARDEN");
}
Discuss
Answer: (c).FLOWER GARDEN
Q318.
What is the output of C Program with switch statement or block?
int main()
{
    int k=25;
    
    switch(k)
    {
        case 24: printf("ROSE ");break;
        case 25: printf("JASMINE "); continue;
        default: printf("FLOWER ");
    }
    
    printf("GARDEN");
}
Discuss
Answer: (d).Compiler error
Q319.
What is the output of C Program with switch statement or block?
int main()
{
    switch(24.5)
    {
        case 24.5: printf("SILVER ");break;
        case 25.0: printf("GOLD "); break;
        default: printf("TIN ");
    }
    
    printf("COPPER");
}
Discuss
Answer: (d).Compiler error
Discuss
Answer: (d).All of the above

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!