Home » C Programming » Decision Making » Question
  1. Which of the following statements are correct about the program given below?
    #include <stdio.h>
    int main ( )
    {
    int a = 0, b = 1;
    b == 1 ? (a = 0) : (a = 1);
    if (a)
    printf ("YES\n");
    else
    printf ("No\n");
    return 0;
    }
    1. Error: 'Declaration terminated incorrectly'
    2. Error: 'Syntax error'
    3. Error: 'Lvalue required'
    4. Error: 'Expression syntax'
    5. The program works correctly without error.
Correct Option: E

The program works correctly without error.



Your comments will be displayed only after manual approval.