Home » C Programming » Decision Making » Question
  1. Which of the following statement are correct about the program given below?
    #include <stdio.h>
    int main ( )
    {
    int a = 40, b = 50;
    if ( a == b )
    printf ("a is equal to b \n");
    elseif (a > b)
    printf ("a is greater than b\n");
    elseif (a < b)
    printf ("a is less than b\n");
    return 0;
    }
    1. Error: 'elseif is not a keyword in C'
    2. Error: 'Expression syntax'
    3. Error: 'L value required'
    4. Error: 'R value requaired'
Correct Option: A

To make the program work replace 'elseif' with 'else if.



Your comments will be displayed only after manual approval.