0
5.6kviews
Write an output for following program:

include <stdio.h>

int main() {
int X = 10, Y, Z;
Z = Y = X;
Y-= -- X;
Z-= X--;
X-= --X -X--;
printf ("X=%d Y=%d Z=%d", X, Y, Z);
}

Mumbai university > FE > SEM 2 > Structured Programming Approach

Marks: 6M

Year: May 2013

1 Answer
0
120views

Output:

X = 7, Y =1, Z = 1

Explanation:

Initially X = Y = Z = 10

Y- = --X; i.e. 10 – 9 = 1

Z- = X--; i.e. 10 – 9 = 1

X- = --X - X--; i.e. 10 – 3 = 7

Please log in to add an answer.