C Programming :: Variables & Data Types - Discussion
Home > C Programming > Variables & Data Types > MCQs Questions Discussion
30 / 51
What will be output of the following "c" code?
#include
void main()
{
int i=5,j=10;
i=i&=j&&10;
printf("%d %d",i,j);
}
void main()
{
int i=5,j=10;
i=i&=j&&10;
printf("%d %d",i,j);
}
A10 5
B5 10
C10 10
D1 10
ECompilation Error
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
STEP-BY-STEP
In the above code,
Line 5 can be written as-
i=(i&=(j&&10));
Now, (j&&10) results to 1, and i=5&1 results to 1.
Hence the output is 1 10.
Read Full Answer
Report Error
Please Login First Click Here