Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


        int main()

        {

            int i = 0;

            char c = 'a';

            while (i < 2){

                i++;

                switch (c) {

               case 'a':

                    printf("%c ", c);

                    break;

                    break;

                }

            }

            printf("after loop\n");

        }

  2. A.
    a after loop
    B.
    a a after loop
    C.
    after loop
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    none


Be The First To Comment