Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


        int main()

        {

            int x = 0;

            if (x == 0)

               printf("true, ");

            else if (x = 10)

                printf("false, ");

            printf("%d\n", x);

        }

  2. A.
    false, 0
    B.
    true, 0
    C.
    true, 10
    D.
    Compile time error

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    none


Be The First To Comment