-
Which of the following statement are correct about the program given below?
#include <stdio.h>
int main ( )
{
int x = 10, y = 20;
if (x == 15) && if (y == 20)
printf ("Have a nice day\n");
return 0;
}
-
- Output: Have a nice day
- No output
- Error: 'Expression syntax'
- Error: 'Undeclared identifier if'
Correct Option: C
The correct form of if would be :
if ((x == 15) && (y == 20))
printf ( "Have a nice day\n");