Provide the output of the following programs after execution
Provide the output of the following programs after execution. Display the output properly. #include #include using namespace std; int main() { int a = 1, b, c, d; b = ++a; a = b--; a* = 2; c = --b-a++; d = --c+b-a--; cout
Solution
For first program output is as below,
4
0
-5
-10
Output of the second program is
output 1:
2
3
2
1
output 2:
1
3
1
1
output 3:
4
1
2
1
output 4:
3
3
2
1
