Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


        #define max(a) a

        int main()

        {

           int x = 1;

            switch (x)

           {

            case max(2):

                printf("yes\n");

            case max(1):

                printf("no\n");

                break;

            }

        }

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

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    none


Be The First To Comment