Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

What are the different operators in C++?

Answers were Sorted based on User's Feedback

What are the different operators in C++?..

Answer / swetcha

Addition: +
Subtraction: ?

Addition Assignment: +
Bitwise AND Assignment: &

Bitwise exclusive OR Assignment: ^
Bitwise inclusive OR Assignment: |
Division Assignment: /

Left shift assignment: <<
Modulus Assignment: %
Multiplication Assignment: *

Right shift assignment: >>
Subtraction Assignment: ?

Bitwise AND: &
Bitwise exclusive OR: ^
Bitwise inclusive OR: |

Logical AND: &&
Logical OR: ||

Comma: ,
Conditional: ? :
Pointer-to-member: .* or ?>*

Reference: &
Scope resolution: ::

Division: /
Modulus: %
Multiplication: *

Cast: ()
Function call: ( )
Member access: . and ?>

Postfix decrement: ??
Postfix increment: ++
Subscript: [ ]

Relational and Equality
Equality: ==
Greater than or equal to: >=
Greater than: >

Less than or equal to: <=
Less than: <
Not equal: !=

Left shift: <<
Right shift: >>

Address-of: &
Indirection: *

Logical Negation: !
One's Complement: ~

Prefix decrement: ??
Prefix increment: ++

Unary Plus Operator: +
Unary Negation Operator: -

Is This Answer Correct ?    16 Yes 8 No

What are the different operators in C++?..

Answer / shweta iyer

1)Arithmetic: for general arithmetic operations. They are "+,-, *,/,%".

2)Relational: for performing operations based on relations.They are ">,<,>=,<=,==,!=".

3)Logical: for performing ooperations based on some logics.They are "AND,OR,NOT".

4)Conditional: it works as simple if-else.It is "?:"

5)Assignment: used to assign some values to the variables. It is "="

6)Increment/Decrement: used to increase or secrease the value of any variable. They are : "++" for increment and "--" for decrement.

7)Bitwise: used to perform operations on bits. They are "&,^,<<,>>"

8)insertion : used to display any value or statement on screen. It is "<<"

9)extraction : used for input. It is ">>"

10)scope resolution: to define the scope of a function member. It is "::"

11)field width: used to set wiidth of the field. It is "setw"

12)memory allocation: to allocate new spaces in memory. It is "new".

13)memory release: to free the memory. It is "delete".

14)line feed: It is used to provide a new line. It is "endl".

15)pointer to member: it is used for pointers. It is .* and .->

Is This Answer Correct ?    6 Yes 0 No

What are the different operators in C++?..

Answer / saleem ullah

bit wise and logical

Is This Answer Correct ?    9 Yes 6 No

Post New Answer

More C++ General Interview Questions

What is an incomplete type?

1 Answers  

What are the techniques you use for debugging?

1 Answers   Adtran,

Why ctype h is used in c++?

0 Answers  

What are function prototypes?

0 Answers  

Define vptr.

0 Answers  

Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

0 Answers  

What is #include iomanip?

0 Answers  

Live example for static function?

1 Answers   Infosys,

What language is a dll written in?

0 Answers  

What is setf in c++?

0 Answers  

What is scope of a variable? (LOLZ)

2 Answers   CA, TCS,

There is a magic square matrix in such a way that sum of a column or a row are same like 3 5 2 4 3 3 3 2 5 sum of each column and row is 10. you have to check that matrix is magic matrix or not?

1 Answers   TCS,