Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. Comment on the output of this C code?


        int main()

        {

            int a = 1;

           switch (a)

            {

           case a:

                printf("Case A ");

            default:

                printf("Default");

            }

        }

  2. A.
    Output: Case A
    B.
    Output: Default
    C.
    Output: Case A Default
    D.
    Compile time error

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    none


Be The First To Comment