Advertisements
Advertisements
प्रश्न
What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.
टीपा लिहा
Advertisements
उत्तर
Arithmetic operators: perform simple arithmetic operations like addition, subtraction, multiplication, division, etc.
Unary Operators:
- Require only one operand.
- Example: +, -, *, /, %, >, <, <=, AND, OR
Binary Operators:
- Require two operands
- Example: ++ (Plus, Plus) Increment operator, – – (Minus, Minus) Decrement operator, NOT, ~,
shaalaa.com
Lexical Units (Tokens)
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 9: Introduction to C++ - Data Types, Variables and Expressions - Evaluation - Section - C [पृष्ठ १५१]
APPEARS IN
संबंधित प्रश्न
Which of the following operator is an extraction operator in C++?
Which of the following statements is not true?
Which of the following is called compile-time operators?
What are keywords?
The following constant is of which type?
0XCAFE
The following constant is of which type?
04.14
Match the following.
| A | B |
| (a) Modulus | (1) Tokens |
| (b) Separators | (2) Remainder of a division |
| (c) Stream extraction | (3) Punctuators |
| (d) Lexical Units | (4) get from |
Differentiate “=” and “==”.
Write about Binary operators used in C++.
Write a short note on the const keyword with an example.
