Operator _ and _ operator priority, operator priority
Mathematical operators (7 ):
+,-, *,/, %, ++, And ,--
1 · % is the remainder operator, for example: 3% 2 = 1 8% 3 = 2
2. ++ and -- are the auto-increment 1 and auto-increment 1 operators.
3. I ++
C Operator priority, operator priority
Priority
Operator
Name or meaning
Usage
Integration direction
Description
1
[]
Array subscript
Array name [constant expression]
Left to right
()
Precedence
Operator
Description
Example
Associativity
1
()[]->.::++--
Grouping OperatorArray accessMember access from a pointerMember access from an objectScoping OperatorPost-IncrementPost-Decrement
(A + B)/4;Array [4]
Guidance:Types of operators C-language operators can be divided into the following types:1. Arithmetic OperatorsIt is used for various numerical operations. Including addition (+), subtraction (-), multiplication (*), Division (/), remainder (or
"operator"at the time of the operation, if the closing parenthesis we know what to do first, then if there is no parentheses, arithmetic operators, relational operators, logical operators, bitwise operators, assignment operators, + + 、--operators,
[C ++ knowledge point Summary] OPERATOR & operator heavy load, knowledge point summary Operator[Operator]
When performing an operation, if we know which operation is performed first, if there are no parentheses, Arithmetic Operators, Relational
The C ++ operator is explained in detail in conjunction with the instance.C ++ operators combined with Instances
An operator is a symbol that tells the compiler to execute a specific mathematical or logical operation. C ++ has built-in rich
Operator overload (small principle)Reprinted from: http://blog.csdn.net/lingyin55/archive/2009/07/05/4322997.aspx
I. meaning and definition of operator overloading
L The existing operators of C ++ are only suitable for processing the basic data
Operator Overloading in the Swift tutorial and swift Operator Overloading
Http://www.raywenderlich.com/80818/operator-overloading-in-swift-tutorial Author: Corinne Krych Translator: Meng xiangyue blog: http://blog.csdn.net/mengxiangyue
This is my
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.