Your SlideShare is downloading. ×
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

# CBSE Class XI :- Operators in C++

737

Published on

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

No Downloads
Views
Total Views
737
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. OperatorsOperators inin C ++C ++ Made By:- Pranav GhildiyalMade By:- Pranav Ghildiyal Class :- ‘XI’ ‘B’Class :- ‘XI’ ‘B’
• 2. ARITHEMATIC OPERATORS PLEASE NOTE :- C+ + is case- sensitive a , A both are different Unary plus A= 5A= 5 Unary minus -A = -5-A = -5
• 3. INCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATOR • These operators increase or decrease the value of the operand by 1 • Increment increases by 1 while the decrement decreases by 1 PREFIX VERSION It follows the change then use rule i.e., it first changes the value of the operand and then use the new value to evaluate the expression POSTFIX VERSION It follows the use then change rule i.e., it first uses the new value of the operand in evaluating the expression and then changes the operands value
• 4. . Operators that act upon two operands are known as binary operators
• 5. Relational operators refer to the relationship that values can have with one another . Relational operators don’t work with string. We can compare numbers and characters with them. If the comparison results in true , the relational operators results in the value 1 else it results in the value 0 (comparison results in false).
• 6. LOGICAL OPERATORSLOGICAL OPERATORS Logical AND The resulting expressions gives the value 1 only if both the original operands are true Logical OR The resulting expressions gives the value 1 if either of the original operands is true Logical NOT It is a unary operator. It reverses the truth value of the expression and gives true if the expression is false 11 Logical OR and Logical AND has lower precedence than relational operatorsLogical OR and Logical AND has lower precedence than relational operators 22 Logical NOT has higher precedence over any relational or arithimatic operatorLogical NOT has higher precedence over any relational or arithimatic operator Facts about operatorsFacts about operators
• 7. CONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATOR
• 8. SOME OTHER OPERATORSSOME OTHER OPERATORS COMPILE TIME OPERATOR • It returns the length (in bytes) of the variable / type specified COMMA OPERATOR IntegerInteger 2 Bytes2 Bytes CharacterCharacter 1 Bytes1 Bytes FloatFloat 4 Bytes4 Bytes DoubleDouble 8 Bytes8 Bytes • It is used to string together several group of expressions. The result of the rightmost expression becomes the value of the total comma seprated expression
• 9. SOME OTHER OPERATORSSOME OTHER OPERATORS COMPILE TIME OPERATOR • It returns the length (in bytes) of the variable / type specified COMMA OPERATOR IntegerInteger 2 Bytes2 Bytes CharacterCharacter 1 Bytes1 Bytes FloatFloat 4 Bytes4 Bytes DoubleDouble 8 Bytes8 Bytes • It is used to string together several group of expressions. The result of the rightmost expression becomes the value of the total comma seprated expression