evaluate the expression a*(3+b)/2-c++*b where a=3,b=4,c=5
Answers
Answered by
5
Answer:
3*(3+4)/2-5*4
3*7/2-30
21/2-30
10-30
-20
Hope it helps
Answered by
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:
- Putting the value in the expression and we get--(3*(3+4)/2-5++ *4) because (a=3,b=4 and c=5).
- Then It will be (3*7/2-5++ *4) because brackets will have higher precedence.
- Then it will be (21/2-5++ *4) because * and / have the same precedence and left operator have higher precedence.
- Then it will be (10-5++ *4) because * and / have the same precedence and left operator have higher precedence.
- 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.
- Then it will be (-10) because (10-20) gives (-10).
Learn More:
- Operator precedence : https://brainly.in/question/13444206
Similar questions
Hindi,
6 months ago
Math,
6 months ago
Biology,
11 months ago
Physics,
11 months ago
Environmental Sciences,
1 year ago