Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    2 < 3 ? return 2 : return 3;
    }
    1. Runtime Error
    2. 2
    3. 3
    4. Compilation Error
    5. None of these
Correct Option: D

Compilation Error

main.c: In function ‘main’:
main.c:4:17: error: expected expression before ‘return’
2 < 3 ? return 2 : return 3;



Your comments will be displayed only after manual approval.