Operators In C++

Dear Students, aaj ke is Lecture main hum Operators In C++ ke bare main padege. Yani ke operators kya hote hai Operators In C++ ka use kya hota hai. Or sath me he operators kitne types ke hote hai. Operators se related ye sare topic ham Operators In C++ ke lecture me cover karege.

Lectures Covering Topics

  • Introduction To Operators In C++ In Hindi
  • What Is Operators In C++ In Hindi
  • Types Of Operators In C++ In Hindi
  • Priority Of Operators In C++ In Hindi

Introduction To Operators In C++ In Hindi

To student jab hum kisi variable main koi value store karte hai. To hum us value ke sath kuch operations bhi performs kar sakte hai. Jaise ki do numeric value ko aapas me addition, multiplication, divination karana.

Ya fir words ki value ko count, frequency, matching, coordination aadi karana. Ye sab kaam kisi na kisi operators ke help se he ho sakta hai. Theek isi tarah aap different type ki value ke saath alag alag operation perform kar sakte hai.

Kisi bhi variable ke sath koi bhi operation perform karne ke liye hame different operators ka use karna padta hai. To chaliye padte hai operators in C++ ke bare main.

What Is Operators In C++ In Hindi

Jaisa ki mene aapko bataya ki operators ka use hum variables par operation perform karne ke liye karte hai. Sabhi data types par different types ke operation kiye jate hai. jaise ki multiply, addition, coordination etc.

Isi karan hum operators bhi different types ke use karte hai.Kisi bhi operation main jo bhi variable use kiye jate hai. Wo operand kahlate hai. Operators eak operand ke saath hi apply kiya jata hai.

Operator Binary or Unary two types ke hote hai. Binary operator 2 operands par apply kiye jate hai. Or unary operator sirf ek operand par apply kiya jata hai. Ab neeche likhe 1 line ke code se samjhte hai operators or operand kya hote hai.

Int X, Y, Z;


Upar likhe code me x or y variable hai jo ki + operator ke sath use kiye gaye hai. Ye dono variable operand or + operator kahalate hai.

Types Of Operators In C++ In Hindi

To student ab hum padege ki C++ me kitne types ke operators hote hai. C++ me kai types ke operators hai joki neeche likhe hue hai.

  • Unary Operator
  • Arithmetic Operator
  • Relational Operator
  • Shift (Bitwise) Operator
  • Logical Operator
  • Ternary (Conditional) Operator
  • Assignment Operator

Types Of Operators In C++ In Hindi

Unary Operators In C++

Unary operator ka use karne ke liye hame sirf eak operand ki jaroorat hoti hai. Is operator ka use hum various operations ke liye karte hai.

  • Value ko Increment/ Decrement karne ke liye
  • Kisi Boolean value ko change karne ke liye
  • Kisi expression ke unsuccessful karne ke liye

Unary Operators Example

Arithmetic Operators In C++

Arithmetic operators ka use hum mathematical operations ko perform karne ke liye karte hai. Ye five types ke hote hai addition, multiplication, subtraction, division, modules.

Arithmetic Operators Example

Shift (Bitwise) Operators In C++

Bitwise operators ka use bit by bit operations perform karne ke liye kiya jata hai. Ye operators variables ke value ko bit me convert karke un par operation perform karte hai.

Shift operators value ko bit bise manipulation karne main use kiya jata hai. C main three types ke shift operators hote hai.

  • Left shift
  • Right shift
  • Right shift with zero fill >>> (or) unsigned right shift

Left Shift Operators Example

Right Shift Operators Example

Relational Operators In C++

Relational operators ka use 2 variables ke beech relation pata lagane ke liye kiya jata hai. Mostly inka use if statement main kiya jata hai. In operators ki helps aapko 2 variables ke beech relation pata chalta hai.

Jiase ki kya dono variable barabar hai ya fir eak choata ya bada hai. ye operators six types ke hote hai.

  • Equal to (==)
  • Not equal to (! =)
  • Greater than (>)
  • Less than (<)
  • Greater than equal to (>=)
  • Less than equal to(<=)

Relational Operators Example

Logical Operators In C++

Logical operators ka use hum Boolean values par operations perform karne ke liye karte hai. ye operators 3 tarah ke hote hai AND(&&), OR(||), NOT(!). Is tarah ke operations me dono variable ki value True ya False hoti hai.

Logical Operators Example

Ternary (Conditional) Operators In C++

Ternary operators ka use eak liner replacement ke roop me kiya jata hai. Yah operators 3 operand ko use karta hai. If-then-else statement ke sath use kiya jata hai. Ternary operators ko conditional operators bhi kha jata hai.

Ternary (Conditional) Operators Example

Assignment Operators In C++

Assignment operators ek most common operators hai. Is operators ka use value ko assing karne ke liye kiya jata hai. Kuch important assignment operators ke bare main neeche likha hua hai.

  • Simple assignment (=)
  • Plus assignment (+=)
  • Minus assignment (-=)
  • Multiply assignment ( * =)
  • Divide assignment (/=)

Assignment Operators Example

Priority Of Operators In C++ In Hindi

Category Types Operators Associativity
Postfix () [] -> . ++ – – Left to right
Unary + – ! ~ ++ – – (type)* & sizeof Right to left
Multiplicative * / % Left to right
Additive + – Left to right
Shift << >> Left to right
Relational < <= > >= Left to right
Equality == != Left to right
Bitwise AND & Left to right
Bitwise XOR ^ Left to right
Bitwise OR | Left to right
Logical AND && Left to right
Logical OR || Left to right
Conditional ?: Right to leftt
Assignment = += -= *= /= %=>>= <<= &= ^= |= Right to leftt
Comma , Left to right

Related Lecture

Dear Students, main aasha karta hun ki aapko Operators In C++ Ka Lecture padh kar samjh me aa gaya hoga ki C++ main operators kya hai hote hai. Yadi aapako (Operators In C++) ke Lecture se related koi bhi problem hai to aap hume comment karke puch skte hai.

Share This Post On

About Author

Thakur Aman Singh

Hey, I am Aman Singh Tomar from Taj City Agra. Through This Blog I want to share my Knowledge with all of you. Read More >>

Leave a Reply

Your email address will not be published. Required fields are marked *