C Programming :: Declarations and Initializations - Discussion
Home > C Programming > Declarations and Initializations > MCQs Questions Discussion
38 / 54
Find the output for the following C program
#include <stdio.h>
int main()
{
int x=2,y=6,z=6;
x=y==z;
printf("%d",x);
}
#include <stdio.h>
int main()
{
int x=2,y=6,z=6;
x=y==z;
printf("%d",x);
}
A3
B0
CNone of these
D1
Answer: Option (Login/Signup)
Show Explanation
x=y==z; Result is 1 as y==z is True, as 6==6.
Then, 1 will be assigned to x
Hence, option D is correct.
Asked In ::
STEP-BY-STEP
In line no. 5-
x=y==z; Result is 1 as y==z is True, as 6==6.
Then, 1 will be assigned to x
Hence, option D is correct.
Read Full Answer
Report Error
Please Login First Click Here