From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Prog1/Op_Prec.htm | 219 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 Bachelor/Prog1/Op_Prec.htm (limited to 'Bachelor/Prog1/Op_Prec.htm') diff --git a/Bachelor/Prog1/Op_Prec.htm b/Bachelor/Prog1/Op_Prec.htm new file mode 100644 index 0000000..3e0b1b1 --- /dev/null +++ b/Bachelor/Prog1/Op_Prec.htm @@ -0,0 +1,219 @@ + + +Reference Material-Operator Precedence Chart + + + +
Operator Precedence Chart +


Operators are shown in decreasing order of precedence from top to bottom. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Operator

+

Type

+

Associativity +

+

:: +

+

:: +

+

binary scope resolution

+

unary scope resolution

+

left to right

+

()
[]
.

+

->

+

++

+

--

+

typeid

+

dynamic_cast<  type  >

+

static_cast<  type  >

+

reinterpret_cast<  type  >

+

const_cast<  type  >

+

parentheses
array + subscript
member selection via object

+

member selection via pointer

+

unary postincrement

+

unary postdecrement

+

run-time type information

+

run-time type-checked cast

+

compile-time type-checked + cast

+

cast for non-standard + conversions

+

cast away const-ness

+

left to right

+

++
--
+
-
!
~
(
type )

+

sizeof

+

&

+

*

+

new

+

new[]

+

delete

+

delete[]

+

unary preincrement
unary + predecrement
unary plus
unary minus
unary logical + negation
unary bitwise complement
C-style unary cast

+

determine size in bytes

+

address

+

dereference

+

dynamic memory allocation

+

dynamic array allocation

+

dynamic memory deallocation

+

dynamic array +deallocation

+

right to left

+

.*

+

->*

+

pointer to member via object +

+

pointer to member via + pointer

+

left to right

+

*
/
%

+

multiplication
division
modulus

+

left to right

+

+
-

+

addition
subtraction

+

left to right

+

<<
>>

+

bitwise left shift
bitwise + right shift

+

left to right

+

<
<=
>
>=

+

relational less + than
relational less than or equal to
relational greater + than
relational greater than or equal to

+

left to right

+

==
!=

+

relational is equal + to
relational is not equal to

+

left to right

+

&

+

bitwise AND

+

left to right

+

^ +

+

bitwise exclusive OR

+

left to right

+

| +

+

bitwise inclusive OR

+

left to right

+

&&

+

logical AND

+

left to right

+

|| +

+

logical OR

+

left to right

+

?: +

+

ternary conditional

+

right to left

+

=
+=
-=
*=
/=
%=
&=
^=
|=
<<=
>>=
+

+

assignment
addition + assignment
subtraction assignment
multiplication + assignment
division assignment
modulus assignment
bitwise AND + assignment
bitwise exclusive OR assignment
bitwise inclusive OR + assignment
bitwise left shift assignment
bitwise right shift with + sign

+

right to left

+

,

+

comma

+

left to +right

+
+
+
-- cgit v1.2.3