C Language Fourth Chapter

Source: Internet
Author: User

The essence of a program is to process data

Now that we know how to use variables to refer to data, when used, variables must be associated with the data in order to really play the role of the variable.

To solve this problem, the C language provides an operator, which is called an expression, such as age=23

Age is a variable, = is an operator, and 23 is data.

Complement: The meaning of the compound operator:

such as + =

The compound operator is not just for simplifying the expression of an operation, but the efficiency is where the compound operator comes in, such as

i=i+2;

i+=2;

The former used two times I, and then only used once, which leads to the latter's efficiency is one times the former.

The meaning of the self-increment decrement operator appears:

Maybe you would like to think it is not +1-1 well, ditto is also to increase efficiency, said the professional point is that we know that all the computer data calculation is done by the CPU (central processor), most of the CPU instruction system directly provides self-increment self-reduction command, so do not need you indirectly +1- It's 1.

The level of the programmer is the beginning of a work can be achieved, if the work can be achieved compared to efficiency.

Finally, let's talk about the readability of the program:

Because your own code is usually to maintain itself, and the maintenance cycle is often more than one months, imagine, when you see your code six months ago, and do not understand the time is comfortable in a sense.

C Language Fourth Chapter

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.