Operators In C++
Operators In C++
Symbol that tells the compiler to perform specific mathematical or logical manipulations.
There are various types of operators in C++
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Assignment Operators
- Increment and Decrement Operators
- Conditional Operators
- Bitwise Operators
- Special Operators
- Extraction Operators
- Insertion Operators
- Scope Resolution Operators
+ Arithmetic Operators :
+ : Addition A + B will give 12
- : Subtraction A - B will give 8* : Multiplication A * B will give 20
/ : Division A/B will give 5
% : Modulation A % B will give 0
++ : Increment operator A++ will give 11
-- : Decrement operator A-- will give 9
May You Like To Read This Related Articles:
What Is Operating System? Knowledge Of OS!!
Operating System As A User Interface And As A Resource Manager - Technopedia!
Services Of Operating System -
Technopedia!!!
Basic Concepts Of OOPC!!
CONCEPT OF DBMS!!
Types Of Operating System - Technopedia!!!
Basic Program Of C Language For Print Hello!!
Relational Operators :
>= : greater than or equal
< : less than
<= : less than or equal
== : equal to
!= : not equal to
Logical Operators :
&& : logical AND
|| : logical OR
! : logical NOT
Assignment Operators :
= : assign value of right side to the left side+= : a+=1 is same as a=a+1
-= : a-=1 is same as a=a-1
*= : a*=1 is same as a=a*1
/= : a/=1 is same as a=a/1
%= : a%=1 is same as a=a%1
Increment and Decrement Operators :
++ : increment value by 1
a++ is postfix
a=5,b=a++ then b=5 a=6
++a is prefix
a=5,b=++a then b=6 a=6
-- : decrement value by 1
a-- is postfix
a=5,b=a-- then b=5 a=4
--a is prefix
a=5,b=--a then b=4 a=4
Recommend Articles For More Information :
Introduction Of C++!!.
Operators In C++
Function Overloading In C++
Data Types in C++
Types Of Constructor In C++
Classes and Objects In C++
What Is Inheritance In C++?
Types Of Inheritance?
Basic Concepts Of OOPC!!
CONCEPT OF DBMS!!
Basic Program Of C Language For Print Hello!!
Conditional Operators :
Ex : x=(a>b)?a:b; is same as
if(a>b)
x=a;
else
x=b;
Bitwise Operators :
& : bitwise AND| : bitwise OR
^ : bitwise exclusive OR
<< : shift left(multiply by 2)
> > : shift right(divide by 2)
Special Operators :
& : Address operator
* : Pointer operator
, : Comma operator
sizeof : It returns the number of bytes the operand occupies
. : member selection operator,used in structure
-> : member selection operator,used in pointer to structure
Extraction Operators :
>> : used with cin to input data from keyboard
Insertion Operators :
<< : used with cout to output data from keyboard
Scope Resolution Operators :
:: : used for the already declared member functions of the class
For More Knowledge Check This Articles For Better Understanding :
Machine Learning Technology in Software Engineering
Trending Pieces Of Technology You Should Know About!!!
CONCEPT OF DBMS!!
Phases Of Compiler In System Programming!!!!
C Program For Addition, Subtraction, Multiplication, Division Of Two Numbers!!
Difference between a monolithic and micro kernel?
Difference Between The Procedure Oriented Language and Object Oriented Language.
What Is Inheritance In C++? Types Of Inheritance?
Comments
Post a Comment