

Note: C++ uses the unnamed dummy-parameter int to differentiate between prefix and postfix increment operators. R, S and T stand for any type(s), and K for a class type or enumerated type.Īll arithmetic operators exist in C and C++ and can be overloaded in C++. Most of the operators available in C and C++ are also available in other C-family languages such as C#, D, Java, Perl, and PHP with the same precedence, associativity, and semantics.įor the purposes of these tables, a, b, and c represent valid values (literals, values from variables, or return value), object names, or lvalues, as appropriate. The formatting of these operators means that their precedence level is unimportant. When not overloaded, for the operators &, ||, and, (the comma operator), there is a sequence point after the evaluation of the first operand.Ĭ++ also contains the type conversion operators const_cast, static_cast, dynamic_cast, and reinterpret_cast. Note that C does not support operator overloading.

All the operators listed exist in C++ the column "Included in C", states whether an operator is also present in C.

This is a list of operators in the C and C++ programming languages. Similar syntax in both computer languages
