Home >Backend Development >C++ >In C language, what are Evaluation, Precedence and Association?

In C language, what are Evaluation, Precedence and Association?

WBOY
WBOYforward
2023-09-03 21:49:051205browse

The "C" compiler evaluates expressions according to precedence and associativity rules.

If the expression contains operators of different precedence, precedence rules will be considered.

In C language, what are Evaluation, Precedence and Association?

Here, 10*2 is evaluated first because ' *' has higher priority than '- ' and '='

If expression Contains the same priority, the associativity rules are considered, that is, from left to right (or right to left).

In C language, what are Evaluation, Precedence and Association?

The above is the detailed content of In C language, what are Evaluation, Precedence and Association?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete