wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

In C programming language, which of the following operators has the highest precedence?

A
Unary +
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
None of the above
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Unary +

In C programming language, unary + operators has the highest precedence.

When several operations occur in an expression, each part is evaluated and resolved in a predetermined order called operator precedence. Parentheses can be used to override the order of precedence and force some parts of an expression to be evaluated before other parts.

The result of the unary plus operator (+) is the value of its operand. The operand to the unary plus operator must be of an arithmetic type. Integral promotion is performed on integral operands. The resultant type is the type to which the operand is promoted.

Operator precedence determines the grouping of terms in an expression and decides how an expression is evaluated. Certain operators have higher precedence than others.

Example:-the multiplication operator has a higher precedence than the addition operator.



flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Associative Property
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon