Computer Applications
What will be the output of the variable 'a'?
int a=0,b=10,c=40;
a = --b + c++ + b;
System.out.println(" a = " + a);
Java
Java Operators
206 Likes
Answer
a = 58
Working
a = --b + c++ + b
⇒ a = 9 + 40 + 9
⇒ a = 58
Answered By
109 Likes
Related Questions
If m = 5 and n = 2, predict the output values of m and n:
(a) m -= n;
(b) n = m + m/n;
If a = 5, b = 9, calculate the value of a in the following expression:
a += a++ - ++b + aEvaluate the following expressions if the values of the variables are a = 2, b = 3, and c = 9.
(a) a - (b++) * (--c);
(b) a * (++b) % c;
What will be the output of the following if x = 5 initially?
(a) 5* ++x;
(b) 5* x++;