Sail E0 Webinar
Question
What is the output of this C code?
int main()
{
int x = 2, y = 0;
int z = (y++) ? y == 1 && x : 0;
printf("%d\n", z);
return 0;
}
Options:
A .  0
B .  1
C .  Undefined behavior
D .  Compile time error
Answer: Option A


None.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers