Question
#include<stdio.h>
int main()
{
int x = 30, y = 40;
if(x== y)
printf("x is equal to y\n");
else if (x > y)
printf("x is greater than y\n");
else if (x > y)
printf("x is less than y\n")
return 0;
}
Which of the following statements are correct about the program?
#include<stdio.h>
int main()
{
int x = 30, y = 40;
if(x== y)
printf("x is equal to y\n");
else if (x > y)
printf("x is greater than y\n");
else if (x > y)
printf("x is less than y\n")
return 0;
}
Answer: Option A
Was this answer helpful ?
This program will result in error "Statement missing ;"
printf("x is less than y`setminus`n") here ; should be added to the end of this statement.
Was this answer helpful ?
Submit Solution