Computer Science, asked by soumyadiptaseal, 6 months ago

what will be the value of m, of m=++n, where n=2, please answer​

Answers

Answered by aanchal6365
1

Answer:

3

Explanation:

answer=3, because it is written ++ n & n= 2 whenever there is + before an alphabet we change and then use ,change and then use means we add on to the no. so the answer comes this

Answered by Sumit1010
1

Answer:

m = 3

Explanation:

If ++ operator appears before a var, it first increments its value by 1 and then assigns it to LHS var in an expression.

if the operator would have appeared after the var (say n++), then it'd first assign the value to the LHS var in an expression and after that it'd increment the value of RHS var. in that case, m 's value would have been 2 instead of 3.

Similar questions