Tamil Nadu Board of Secondary EducationHSC Science Class 11th

What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them. - Computer Science

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
Short Note

What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.

Advertisement Remove all ads

Solution

Arithmetic operators: perform simple arithmetic operations like addition, subtraction, multiplication, division, etc.

Unary Operators:

  1. Require only one operand.
  2. Example: +, -, *, /, %, >, <, <=, AND, OR

Binary Operators:

  1. Require two operands
  2. Example: ++ (Plus, Plus) Increment operator, – – (Minus, Minus) Decrement operator, NOT, ~,
Concept: Lexical Units (Tokens)
  Is there an error in this question or solution?

APPEARS IN

Tamil Nadu Board Samacheer Kalvi Class 11th Computer Science Answers Guide
Chapter 9 Introduction to C++
Data Types, Variables and Expressions - Evaluation - Section - C | Q 1. | Page 151
Share
Notifications

View all notifications


      Forgot password?
View in app×