Computer Science, asked by azadkanaujia, 6 months ago

d. State the value of a,b,c (Show the steps):

int a=12, b=13 and c=11

b-=--C+++C+a++%2+ (b++);
c+=a--+--a +(b++) * (++b)/3;
System.out.println("a="+a);
System.out.println("b="+b);
System.out.println("c+"+c);​

Answers

Answered by Aashikaushik
2

Explanation:

b=c++ + c+a++%2+ b++

b=11+12+12%2+13

b=35%2+13

b=35%15

b=5

upto here a=12,b=5 and c=12.

now,

c+=a-- + --a + b++* ++b/3

c=c+ 12 +10+5*6/3

c=12+12+10+5*6/3

c=39*6/3

c= 234/3

c= 78

finally

a=10

b=6

and c= 78

hope it will help you

Similar questions