-
there are two types of operators :
- Using Operand :
- unary : work with one operand
- binary : works with two operands
- ternary : works with three operands
- both in C and C++ support only one ternary operator that is conditional operator
- syntax : condition ? true value : false value ;
- Using Operation :
- arithmetic : + - * / %
- relational : > < > = < = == ! =
- bitwise : & | ^ ~ >> <<
- logical : && || !
- conditional : ? :
- assignment : =
- *compound assignment : += -= = |= ^= &= >> = << =
- special : [ ] ( ) , . - > ::
-
C suppoert 45 operators But C++ supports 56 ( 11 extra operators )
-
11 Extra operators :
- :: ( scope resulation)
- ::* ( scope resulation star )
- . ( dot )
-
type conversion
Dynamic memory allocation
- new ( )
- staic_cast ( )
- dynamic_cast
- reinterpreter_cast ( )
- . / - > *