Home » C Programming » Operators » Question
  1. Which of the following statements are correct about the code snippet given below?
    int number = 10;
    int p = number > 5 ? p = 30;
    1. First; is treated as a null statement
    2. Second; is treated as a statement terminator
    3. 30 would be assigned to p
    4. Compiler would report an error
Correct Option: D

Compiler would report an error.
error: expected ':' before ';' token



Your comments will be displayed only after manual approval.