[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Control Instructions - Discussion

Home > C Programming > Control Instructions > MCQs Questions Discussion

24 / 33

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);
    }

ANo error, output is 1111

BNo error, output is 1

CCompile time error, no break statements

DCompile time error, case label outside switch statement

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Capgemini

Post Your Answer Here:     

No Discussion on this question yet!