evaluate the following expression according to operator precedence used in c, 10-3%8+6/4
Answers
Answered by
9
10-3%8+6/4
10-3+6/4
10-3+1
7+1
8
10-3+6/4
10-3+1
7+1
8
Answered by
0
When more than one operator is used in the expression, Operator precedence helps in determining which operator is used first.
So the expression is evaluated as:
The given expression is 10-3%8+6/4
- Firstly the '%' operator is used from left to right and the expression after evaluation becomes:
- Then further the '/' operator is used from left to right and the expression after evaluation becomes:
- Then the '-' operator is used from left to right and the expression after evaluation becomes:
- At last, the final answer become
So after, evaluating the expression the final answer becomes 8.
Similar questions