Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int p = 4;
    int q = 1;
    int R = (q == 1) ? p :(p > q) ? (q = 1): p;
    printf("%d\n", q);
    }
    1. 0
    2. 1
    3. 4
    4. Compilation Error
    5. None of these
Correct Option: B

1



Your comments will be displayed only after manual approval.