Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


        const int a = 1,  b = 2;

        int main()

        {

            int x = 1;

            switch (x)

            {

            case a:

                printf("yes ");

            case b:

                printf("no\n");

                break;

            }

        }

  2. A.
    yes no
    B.
    yes
    C.
    no
    D.
    Compile time error

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    none


Be The First To Comment