Evaluate the following A=10 B=5 C=8 S=A>B and C>A what is the value of S
Share
Evaluate the following A=10 B=5 C=8 S=A>B and C>A what is the value of S
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
KnowledgeBoat Logo
Computer Applications
Evaluate 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;
Java
Java Operators
ICSE
34 Likes
ANSWER
(a) a - (b++) * (--c);
22
WORKING
a - (b++) * (--c)
⇒ 2 - 3 * 8 [∵ b++ uses current value of b in expression and then increments it, --c decrements c to 8 and then uses this 8 in the expression]
⇒ 2 - 24
⇒ -22
(b) a * (++b) % c;
8
WORKING
a * (++b) % c
⇒ 2 * 4 % 9 [∵ ++b increments b to 4 then uses it in the expression]
⇒ 8 % 9
⇒
Answer:
False if it's a python
Explanation:
A>B # True
C>A # False
True and False # False