Computer Science, asked by deepesh10, 1 year ago

please solve itttt foolish answer will be repoted...

Attachments:

Answers

Answered by kiddie2
0
6
2

hope iys correct...ICSE???

deepesh10: how please telll but 2 will not be answe
deepesh10: mera secound wala nhi a rha hain
kiddie2: a-=(a--)-(--a)..accordig to rule first -- vl be implemented.....so...a-=5-3...a-=2...a=6-2....a=4...i wrote 2 by mistake..srry
Answered by siddhartharao77
1
int a = 5;
a++;
System.out.println(a);
a-=(a--)-(--a)
System.out.println(a);
}

Output:

6
4


Hope this helps!

deepesh10: kaise yrr batao to 2 wala kaise aya plzz tell
siddhartharao77: a = 5, a++ = a + 1 = 6
deepesh10: secound wala yrr 4 kaise aya
siddhartharao77: Its difficult to explain here. But i can tell you one thing. Remember one thing The decrement operator first assigns the value to the result and then it decrements. Ex: If a = 5, then b = a-- means. b value is 5 an a value is 4.
deepesh10: okk i got it
Similar questions