Operatori

= Tabelul priorităţii operatorilor C++ = [ ] . -> -- ++ || f(e) t[i] s.c p->c a-- a++ || apel funcţie indexare selecţie selecţie indirectă postdecrementare <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">postincrementare || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">s ---> d ** ||
 * **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">Operator ** || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">Utilizare ** || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">Semnificatie **  || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">Asociativitate ** ||
 * <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">
 * <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">-

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> +

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> --

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> ++

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> !

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> ~

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> *

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> &

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> sizeof

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">-v

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> +v

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> --a

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> ++a

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> !i

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> ~i

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> *p

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> &a

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> sizeof(x)

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> (d) e || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">schimbare semn

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> plus unar ( fără efect)

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> predecrementare

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> preincrementare

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> negaţie logică

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> complementare ( negare bit cu bit )

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> adresare indirectă

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> preluare adresă

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> determinare dimensiune ( în octeţi )

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> conversie de tip ( cast ) ||

**<span style="color: red; font-family: Arial,sans-serif; font-size: 10pt;">operatori unari ** **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">s <--- d ** ||
 * <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">*

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> /

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> %

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">+

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> -

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"><<

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> >>

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> <

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> <=

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> >

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> >=

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> ==

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> !=

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> &

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> ^

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> |

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> &&

||  || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">v1*v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1/v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1%v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">v1+v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1-v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1<<i2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1>>i2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1<v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1<=v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1>v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1>=v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1==v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> v1!=v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1&i2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1^i2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1|i2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1&&i2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> i1 || i2 || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">înmulţire

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> împărţire

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> rest împărţire ( modulo )

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">adunare

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> scădere

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> deplasare stânga pe biţi <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">deplasare dreapta pe biţi

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> mai mic

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> mai mic sau egal

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> mai mare

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> mai mare sau egal

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> egal

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> diferit

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> **şi** pe biţi

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> **sau exclusiv** pe biţi

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> **sau** pe biţi

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> **şi** logic ( conjuncţie )

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> **sau** logic ( disjuncţie ) || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">s ---> d ** ||
 * <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">? :

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> =

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> *= /= %=

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> += -=

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> &= ^= |=

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> <<= >>= || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">i?v1:v2

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> a=v <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">a*=v || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">operator condiţional ( ternar )

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> atribuire <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">variante ale

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> operatorului de atribuire || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">s <--- d **  ||
 * <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">, || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">e1,e2 || <span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">secventiere || **<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">s ---> d **  ||

//<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;">Legenda: //

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> a-variabila intreaga sau reala i-intreg

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> c-camp v-valoare intreaga sau reala

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> d-nume tip p-pointer

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> e-expresie s-structura sau uniune

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> f-nume de functie t-tablou

<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: 12pt;"> x-nume tip sau expresie

=<span style="color: #000099; font-family: 'Times New Roman',serif; font-size: small;">//Observaţie//: Asociativitate de dreapta au doar: =