Examveda
Examveda

What is the result of the expression 5 + 7 * 2 in C?

A. 19

B. 24

C. 26

D. 17

Answer: Option A

Solution(By Examveda Team)

In C and many programming languages, mathematical expressions follow the operator precedence rules. Multiplication (*) and division (/) have higher precedence than addition (+) and subtraction (-).

So, when evaluating the expression "5 + 7 * 2," the multiplication is performed before addition:

5 + (7 * 2) = 5 + 14 = 19

Therefore, the result of the expression "5 + 7 * 2" in C is Option A: 19.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Comments ( 1 )

  1. Raj Kishan
    Raj Kishan :
    7 months ago

    How

Related Questions on Operators and Expressions