Computer Science, asked by Vishalagni623, 11 months ago

evaluate the expression a*(3+b)/2-c++*b where a=3,b=4,c=5

Answers

Answered by anupama777vidya
5

Answer:

3*(3+4)/2-5*4

3*7/2-30

21/2-30

10-30

-20

Hope it helps

Answered by AskewTronics
2

(-10) is the answer if we evaluates a*(3+b)/2-c++*b in c language for the value of a=3,b=4,c=5.

Explanation:

  1. Putting the value in the expression and we get--(3*(3+4)/2-5++ *4) because (a=3,b=4 and c=5).
  2. Then It will be (3*7/2-5++ *4) because brackets will have higher precedence.
  3. Then it will be (21/2-5++ *4) because * and / have the same precedence and left operator have higher precedence.
  4. Then it will be (10-5++ *4) because * and / have the same precedence and left operator have higher precedence.
  5. Then it will be (10-20) because * and / have the same precedence and left operator to have higher precedence and post-increment operator increase the value after one operation then after these steps the value of c variable will be 6.
  6. Then it will be (-10) because (10-20) gives (-10).

Learn More:

  • Operator precedence : https://brainly.in/question/13444206

Similar questions