Computer Science, asked by shashankg34, 9 months ago

int a=5 b=2 c;
if (a>b//a!b)
C=++a+-b;
System.out.print(c);

Answers

Answered by ramlakhanpatelhm
0

Answer:

4-2 =2 c =2

Explanation:

hope it will help you

Answered by SpaceWalker17
5

♧SOLUTION♧

c = ++a + -b

c = (5+1) + (-2)

c = 6 - 2

c = 4

Output : 4

ADDITIONAL INFORMATION

  • If you use the ++ operator as prefix like: ++var. The value of var is incremented by 1 then, it returns the value.

  • If you use the ++ operator as postfix like: var++. The original value of var is returned first then, var is incremented by 1.

  • The -- operator works in a similar way like the ++ operator except it decreases the value by 1.

HOPE THIS ANSWER WILL HELP YOU!!

Similar questions