Give the output on the screen of the following program
#include <stdio.h>
int main()
{
int x = 3, y = 1 , z = 0;
x = x && y || z; printf("%d\n",x);
printf("%d\n",x || ! y && z);
x = y = 2;
z = x ++ - 1 ; printf("%d\n",x);printf("%d\n",z);
z+= -x ++ + ++ y; printf("%d\n",x);printf("%d\n",z);
z = x / ++ x; printf("%d\n",x);printf("%d\n",z); return 0;
}
Difficulty level
This exercise is mostly suitable for students
1
1
3
1
4
1
5
1
Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Star pattern 22