What will be the output of the following code? int main () { int x = 4, y = 0;…
Infosys · 2023
What will be the output of the following code?
int main ()
{
int x = 4, y = 0;
int z;
z = (x++ + ++y + y++ , x++);
printf ("%d\n", z);
return 0;
}
- A.
5
- B.
0
- C.
Compiler error
- D.
Undefined behaviour, as the order of evaluation can differ
Attempted by 97 students.
Sign up free to check your answer
Sign up freeLoading lesson…