Yesterday's blog How to define a variable, the purpose of defining a variable is to use a variable to save the data that needs to be performed, and to use the variable to operate, then the corresponding operator needs to be calculated. So today we're going to take a look at the common operators of C languages.
First, let's introduce the C operator. Arithmetic is the process of processing the data, which enables every complete program that can be run to process the data as if it were a factory. Symbols that describe the various operations become operators. The operator of the C language. (Some of the operators in the diagram need to be understood and used flexibly, the graph needs to be supplemented + + 、--)
After describing the operators, let's talk about arithmetic operators and arithmetic expressions. The basic arithmetic operators for C include + 、-、
,/,%, + + 、--。 Of these, the first three are the same as the daily life usage, while the% in the C language for the remainder operator for example
3%2=1
From this short formula, it can be seen that 3 to 2 Yu Yushu is 1, so the use of% is to find the remainder of the formula. and + + and--we'll talk about his usage in the rear.
Let's explain the precedence of the C operator, which has the priority of the operation in any arithmetic, such as multiplication first and then minus. In the C language, the priority is from high to low (+ + 、--), (,/,%), (+,-).
Today to introduce so much for everyone, today a little tired, and then update it tomorrow
C-Language operators and expressions (top)