Predict the output:
int a = -10, b= -20; in java
Answers
Answered by
0
Answer:
if a+b
ans -> -10+(-20=) => -10-20 => -30
if a-b
ans -> -10 -(-20) => -10+20 => 10
if a*b
ans -> -10*-20 => 200
if a/b
ans-> -10/-20 => 10/20 => 0.5 in case of float or double or If of integer type then it's equal to 0
if a%b
ans-> 10/20 The Remainder Remaining i.e. -> 5
_____________
HOPE YOU UNDERSTAND :)
Similar questions