When a=6, c= ++a what will be the value of c in C++ language.
Answers
Answered by
2
After Execution:
c = 7
Explanation:
Initially, a = 6,
So, c = ++a, c = 6 + 1 or c = 7.
Answered by
1
Answer:
Explanation:
The value of c will be .
What does ++a means?
The expression a++ evaluates to the current value of a and increases a by one as a side effect. The expression ++a evaluates to the current value of a + 1 and increments a by one as a side effect.
Here the value of a is . c is another variable and here it will store the increament value of a . As the ++ signs is before a , the increament will be first and then the vallue will be assigned. And ++a means a+1. So the value is .
The value of c is in C++ language.
#SPJ2
Similar questions