This is a premium lesson. You can see the shape of every card — unlock to read them.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Operator என்பது variables அல்லது values மீது ஒரு குறிப்பிட்ட operation செய்ய ……
Premium
This card is part of the premium lesson.
Unlock
Example
int c = a + b; இதில்: a , b →……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
- operator இரண்டு values-ஐ ad……
Premium
This card is part of the premium lesson.
Unlock
Mathematics-ல்: 10 + 20 இதில்……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
C++-லும் இதே concept. int result = 10 + 20; இங்கு: 10……
Premium
This card is part of the premium lesson.
Unlock
Operand என்றால் என்ன?
Operator எந்த values மீது வேலை செய்……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Another: x++; இதில்: x → Oper……
Premium
This card is part of the premium lesson.
Unlock
Operands ↓ Operator applied ↓……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Main types of operators in c++
C++-ல் முக்கியமாக: Arithmetic Operators Relational Operators Logical Operators ……
Premium
This card is part of the premium lesson.
Unlock
ARITHMETIC OPERATORS
Arithmetic calculations செய்ய……
Premium
This card is part of the premium lesson.
Unlock
Addition +
int a = 10; int b = 20; int c……
Premium
This card is part of the premium lesson.
Unlock
Subtraction
int a = 20; int b = 5; int c ……
Premium
This card is part of the premium lesson.
Unlock
Result
Multiplication *
int a = 5; int b = 4; int c =……
Premium
This card is part of the premium lesson.
Unlock
Result
Division /
int a = 20; int b = 5; int c ……
Premium
This card is part of the premium lesson.
Unlock
Result
Very important - integer division
int x = 5 / 2; Mathematics: 5 / 2 = 2.5 ஆனால் C++ integ……
Premium
This card is part of the premium lesson.
Unlock
Floating division
Premium
This card is part of the premium lesson.
Unlock
Result
Also: double x = 5 / 2.0;…
Premium
This card is part of the premium lesson.
Unlock
Result
ஏனெனில் one operand floating-……
Premium
This card is part of the premium lesson.
Unlock
Modulus %
% remainder கண்டுபிடிக்க பயன்……
Premium
This card is part of the premium lesson.
Unlock
So
Modulus examples
10 % 2 = 0 11 % 2 = 1 15 % 4 ……
Premium
This card is part of the premium lesson.
Unlock
Modulus use - even / odd
if (number % 2 == 0) { cout…
Premium
This card is part of the premium lesson.
Unlock
% normally integer operands-க……
Premium
This card is part of the premium lesson.
Unlock
Example
10 % 3 Valid. Floating-point remainder தேவை……
Premium
This card is part of the premium lesson.
Unlock
Arithmetic program
Premium
This card is part of the premium lesson.
Unlock
Notice: 20 / 6 = 3 because in……
Premium
This card is part of the premium lesson.
Unlock
RELATIONAL OPERATORS
Two values-ஐ compare செய்ய பய……
Premium
This card is part of the premium lesson.
Unlock
Result
Table
Main relational operators
Equal to ==
Premium
This card is part of the premium lesson.
Unlock
Result
Result
Premium
This card is part of the premium lesson.
Unlock
Meaning
10 value-ஐ x-க்கு assign செய்……
Premium
This card is part of the premium lesson.
Unlock
Meaning
x value 10-க்கு equal-ஆ என்று……
Premium
This card is part of the premium lesson.
Unlock
Not equal !=
Premium
This card is part of the premium lesson.
Unlock
Result
Because 10 and 20 are not equ……
Premium
This card is part of the premium lesson.
Unlock
Greater than >
Premium
This card is part of the premium lesson.
Unlock
Result
Less than <
Premium
This card is part of the premium lesson.
Unlock
Result
Greater than or equal >=
10 >= 10 True. 15 >= 10 True.…
Premium
This card is part of the premium lesson.
Unlock
Less than or equal <=
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Because default C++ output: t……
Premium
This card is part of the premium lesson.
Unlock
Boolalpha
If we want: true false instea……
Premium
This card is part of the premium lesson.
Unlock
Example
LOGICAL OPERATORS
Multiple conditions combine செ……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Logical and &&
Both conditions true என்றால் மட்டும் result true. true && true → ……
Premium
This card is part of the premium lesson.
Unlock
Both conditions: age >= 18 → ……
Premium
This card is part of the premium lesson.
Unlock
Logical or ||
At least one condition true இருந்தால் result true. Truth t……
Premium
This card is part of the premium lesson.
Unlock
Example
Logical not !
Result reverse செய்யும். !tru……
Premium
This card is part of the premium lesson.
Unlock
Result
Premium
This card is part of the premium lesson.
Unlock
Table
Truth table
Table
NOT:
Short-circuit evaluation
இந்த concept exam/interview-க்கு important. For: A && B A……
Premium
This card is part of the premium lesson.
Unlock
Example
If
First condition: x != 0 → false அதனால் second c……
Premium
This card is part of the premium lesson.
Unlock
Or short circuit
A || B A true என்றால் entire ……
Premium
This card is part of the premium lesson.
Unlock
ASSIGNMENT OPERATORS
Variable-க்கு value assign செய்ய பய……
Premium
This card is part of the premium lesson.
Unlock
Table
Compound assignment operators
[+=] int x = 10; x += 5; Means: x = x + 5; Calcula……
Premium
This card is part of the premium lesson.
Unlock
Result
Premium
This card is part of the premium lesson.
Unlock
Result
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
INCREMENT AND DECREMENT OPERATORS
Increment: ++ Decrement: --…
Premium
This card is part of the premium lesson.
Unlock
Increment ++
Value by 1 increase செய்கிறது. int……
Premium
This card is part of the premium lesson.
Unlock
Decrement
Value by 1 decrease செய்கிறது……
Premium
This card is part of the premium lesson.
Unlock
Two types
Increment: ++x → Pre-increment x++ → Pos……
Premium
This card is part of the premium lesson.
Unlock
Pre-increment
int x = 5; int y = ++x; Step-by-step: x ……
Premium
This card is part of the premium lesson.
Unlock
Post-increment
int x = 5; int y = x++; Step-by-step: x = 5 First old……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
After statement
Pre-decrement
Premium
This card is part of the premium lesson.
Unlock
Result
Post-decrement
Premium
This card is part of the premium lesson.
Unlock
Result
BITWISE OPERATORS
Bit-level operations செய்ய பயன்படும். Int……
Premium
This card is part of the premium lesson.
Unlock
Example
5 = 0101 3 = 0011 Apply: 0101……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Result
Bitwise or |
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Result
Premium
This card is part of the premium lesson.
Unlock
Bitwise xor ^
XOR: Same bits → 0 Different bits → 1 5 = 0……
Premium
This card is part of the premium lesson.
Unlock
Result
Bitwise not ~
All bits invert செய்கிறது. 0 → 1 1 → 0 Example conceptually: 00000101 ↓ 11111010 ……
Premium
This card is part of the premium lesson.
Unlock
Left shift <<
Bits left side shift செய்கிறத……
Premium
This card is part of the premium lesson.
Unlock
Result
For non-negative integers, shifting right by one often behaves like division……
Premium
This card is part of the premium lesson.
Unlock
Example
true && false Logical. But: 5……
Premium
This card is part of the premium lesson.
Unlock
CONDITIONAL / TERNARY OPERATOR
C++-ல் ternary operator: ? : இதற்கு three operands இருப்பதால் ternary operator என்று அழைக்க……
Premium
This card is part of the premium lesson.
Unlock
Result
Ternary flow
Condition | +---- true ----> Expression 1 | +---- false ---> Expression 2 [IF-ELSE v……
Premium
This card is part of the premium lesson.
Unlock
int maxValue = (a > b) ? a : ……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
SPECIAL OPERATORS
C++-ல் பல special operators உள்ளன. Important ones: sizeof & * :……
Premium
This card is part of the premium lesson.
Unlock
Common output: 4 But actual s……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Address-of operator &
Variable-ன் memory address ob……
Premium
This card is part of the premium lesson.
Unlock
Dereference operator *
Pointer points செய்யும் address-ல் ……
Premium
This card is part of the premium lesson.
Unlock
Here * has a different meanin……
Premium
This card is part of the premium lesson.
Unlock
Example
std::cout Here: :: Scope resolution operator. It……
Premium
This card is part of the premium lesson.
Unlock
Member access .
Object member access செய்ய: s……
Premium
This card is part of the premium lesson.
Unlock
Arrow operator ->
Pointer-to-object மூலம் member access செய்ய: ptr->mark [……
Premium
This card is part of the premium lesson.
Unlock
Function call operator ()
display(); () function call s……
Premium
This card is part of the premium lesson.
Unlock
Comma operator ,
Comma பல contexts-ல் separator ஆகவும், expression operator ஆகவும் இருக்கும். Example separator: int a, b, c; ……
Premium
This card is part of the premium lesson.
Unlock
Operators based on number of operands
Operators-ஐ operands count அடிப்படையிலும் classify செய்யலாம். Unary Operator One operand. Examples: ++x --x !……
Premium
This card is part of the premium lesson.
Unlock
Result
Here - unary operator. But: a - b Here - bi……
Premium
This card is part of the premium lesson.
Unlock
Operator precedence
When multiple operators occur in one expression, compiler எந்த operation first perform செய்ய வேண்டும் என்பதை ……
Premium
This card is part of the premium lesson.
Unlock
With parentheses
int x = (2 + 3) * 4; Parenthe……
Premium
This card is part of the premium lesson.
Unlock
Result
Common precedence order
For basic exams, remember rou……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
↓ < >= ↓ == != ↓ && ↓ || ↓ ?: ↓ = += -= *= /……
Premium
This card is part of the premium lesson.
Unlock
Associativity
Same precedence operators multiple times இருந்……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
So: (20 - 10) - 5 = 10 - 5 = ……
Premium
This card is part of the premium lesson.
Unlock
Right-to-left assignment
Assignment operators associat……
Premium
This card is part of the premium lesson.
Unlock
Example
Process
Premium
This card is part of the premium lesson.
Unlock
Final
Program - multiple operators
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Common error 2 - integer division
double x = 5 / 2; You might expect: 2.5 But 5 / 2 happens……
Premium
This card is part of the premium lesson.
Unlock
Result
Common error 3 - modulus
Do not treat: 10 % 3 as percentage. % means remainder, ……
Premium
This card is part of the premium lesson.
Unlock
Result
Common error 4 - pre/post increment
Premium
This card is part of the premium lesson.
Unlock
But x after statement: 6 Wher……
Premium
This card is part of the premium lesson.
Unlock
[COMMON_ERROR 5 - && vs &] condition1 && condition2 Logical AND. n……
Premium
This card is part of the premium lesson.
Unlock
Dry Run
Dry run 2
Remember these strongly: = → Assignment == → Equality comparison && → L……
Premium
This card is part of the premium lesson.
Unlock
Main operator types: A R L A I B C A → Arithmetic R → Rel……
Premium
This card is part of the premium lesson.
Unlock
What is an operator? An operator is a symbol that ……
Premium
This card is part of the premium lesson.
Unlock
Trb point - very important
Consider: int x = 10 + 5; Token analysis: int……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
5 → Integer literal ; → Punct……
Premium
This card is part of the premium lesson.
Unlock
Trb point - pre/post
Given: int x = 5; int y = x++; Final:……
Premium
This card is part of the premium lesson.
Unlock
Difference between = and ==? ……
Premium
This card is part of the premium lesson.
Unlock
Example
Assigns. x == 10 Compares.…
Premium
This card is part of the premium lesson.
Unlock
Difference between && and &? && Logical AND Used mainly with Boolean conditions Supports short-circuit ……
Premium
This card is part of the premium lesson.
Unlock
Difference between x++ and ++x? When used as a standalone statement……
Premium
This card is part of the premium lesson.
Unlock
Which is an arithmetic operat……
Premium
This card is part of the premium lesson.
Unlock
Which operator finds remainde……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Logical AND operator is:…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Logical NOT operator is:…
Premium
This card is part of the premium lesson.
Unlock
What is the output? int x = 5……
Premium
This card is part of the premium lesson.
Unlock
Afterward x = 6. 1. What is t……
Premium
This card is part of the premium lesson.
Unlock
What is: 5 / 2 when both oper……
Premium
This card is part of the premium lesson.
Unlock
Which is a ternary operator?…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Result
Premium
This card is part of the premium lesson.
Unlock
1. Which has higher precedenc……
Premium
This card is part of the premium lesson.
Unlock
Answer: B) * Therefore: 2 + 3……
Premium
This card is part of the premium lesson.
Unlock
Result
Practice
Find the output: int a = 10; ……
Premium
This card is part of the premium lesson.
Unlock
Practice
Practice 2
Find final values: int x = 10……
Premium
This card is part of the premium lesson.
Unlock
Dry Run
x = 10 x += 5 x = 15 x *= 2 x……
Premium
This card is part of the premium lesson.
Unlock
Practice
Practice 3
Find output: int x = 5; cout…
Premium
This card is part of the premium lesson.
Unlock
Operator Operator என்பது operands மீது operation செய்யும் symbol. Main categories: O……
Premium
This card is part of the premium lesson.
Unlock
- → Addition - → Subtraction ……
Premium
This card is part of the premium lesson.
Unlock
/ → Division % → Remainder = → Assignment == → Comparison && → AND || → OR ! →……
Premium
This card is part of the premium lesson.
Unlock