Computer Science, asked by akshitstudy, 3 months ago

What is the difference between a+1 and a++?​

Answers

Answered by Ajaysunil2003
2

Answer:

The only difference is the order of operations between the increment of the variable and the value the operator returns. So basically ++i returns the value after it is incremented, while i++ return the value before it is incremented. At the end, in both cases the i will have its value incremented.

Answered by prathamesh299
5

Answer:

PLS MARK BRAINLIEST

Explanation:

The ++ prefix or postfix operators change the variable value. Both the operators increase the value of n by 1. The difference between them exists when you use the operators along with the assignment operator. This is very similar to what pre-increment operator would result in.

Similar questions