Top

Discussion

What will be the output of the program?

#include
int main()
{
    int x, y, z;
    x=y=z=1;
    z = ++x || ++y && ++z;
    printf("x=%d, y=%d, z=%d\n", x, y, z);
    return 0;
}

 

  • A.x=2, y=1, z=1
  • B.x=2, y=2, z=1
  • C.x=2, y=2, z=2
  • D.x=1, y=2, z=1

Answer: A

No answer description available for this question.
 

No comment is present. Be the first to comment.
Loading…

Post your comment