Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?

    int main()
    {
    int a = 2;
    int b = 0;
    int y = (b == 0) ? a :(a > b) ? (b = 1): a;
    printf("%d\n", y);
    }
  2. A.
    Compile time error
    B.
    1
    C.
    2
    D.
    Undefined behaviour

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    None.


Be The First To Comment