KnowledgeBoat Logo

Output Questions for Class 10 ICSE 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

ICSE

182 Likes

Answer

a = 58

Working

    a = --b + c++ + b
⇒ a = 9 + 40 + 9
⇒ a = 58

Answered By

93 Likes