Given the code fragment: What could expression1 and expression2 be, respectively, in
order to produce output –8, 16?
A.
A + +, b – –
B.
+ +a, – -b
C.
+ +a, b- –
D.
A+ +, – – b
Given the code fragment: What could expression1 and expression2 be, respectively, in
order to produce output –8, 16?
A.
A + +, b – –
B.
+ +a, – -b
C.
+ +a, b- –
D.
A+ +, – – b
C
correct C is the answer.
c
C.
+ +a, b- –
int a = -10;
int b = 17;
int c = ++a;
int d = b–;
c++;
System.out.println(c);
d–;
System.out.println(“a: ” + c + ” b: ” + d);