C-Language operators and expressions (top)

Source: Internet
Author: User
Tags arithmetic arithmetic operators
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.