Int A = 10 , B = 20 , C=30 ; X ; String R ; char L = 'a' , M= 'b' , N= 'd' ; Boolean Z
1. X =A++ /B++ > C-- ? C++ /B ++ + - - A : ++ A% - - C
This is conditional or ternary operator question
Don't try to spam
Answers
Answered by
2
Answer:-
Given that
a=10
b=20
c=30
x=(a++/b++>c--)?(c++/b++ + --a): ++a%--c
Now,
a++/b++
=10/20
=0 (integer division)
Note:- value of a and b are 11 and 21 now.
Now,
0>c--
=0>30
which is false.
Now, c=29
So,
x=++a%--c
➡ x =12%28
➡ x=12
Hence, the final value of x is 12.
For verification,check out the attachment.
Attachments:
Similar questions