Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

C language fundamental operator

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Our primary school mathematics has learned operation symbols such as addition, subtraction, multiplication and division, as well as four mixed operations, and these operation symbols are also found in the C language, but there are some different expressions, and there are rated operation symbols. In C language programming, the symbol discrimination of addition, subtraction, multiplication, division and taking remainder are: +, -, *, /,%. In addition, there are two rated operators + + and-- in C language, and they are used in the same way, one is self-plus 1 and the other is self-subtractive 1. Let's choose + + to talk about it.

+ + in usage means to add 1, note that variables are added by themselves, for example, baked + means b=b+1, and in programming we have two common ways to add first and then add. For example, unsigned char a = 0; unsigned char b = 0; then the whole operation process of a = + + b; is to calculate b=b+1 first, then b equals 1, and then run axib. If it is written as a b=b+1, then the operation process is to perform the aquib first, and then to perform the BPI, and the consequence of the implementation is the axiom 0rem bread1.

Just now, it is called the arithmetic operator, but it uses the C language, a very major assignment operator "=". Our previous program has been using it all the time, but there has been no specific interpretation of this operator. In C, "=" means to assign a value, not equal to. The most classic example is axiom 1 / b 2; if it is written as a = axib; this operation in mathematics an equals a plus b, but in c language it means to send the consequence of a plus b to a, then the consequence after the operation is that an equals 3 and b equals 2.

At this point, we have to say that the analogy operator of C language is "=". In C language, this is the relational operator of whether stop can be equal to or not, and "! =" is not equal to the relational operator. Here is a complex introduction to these operators, and then we will use them to help everyone stabilize this common sense. Some other operators will be introduced one after another in the process of using them.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report