Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?

        int main()
        {
            int y = 1;
            if (y & (y = 2))
                printf("true %d\n");
            else
                printf("false %d\n");
     
        }
  2. A.
    true 2
    B.
    false 2
    C.
    Either option a or option b
    D.
    true 1

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    None.


Be The First To Comment