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, ~,
APPEARS IN
संबंधित प्रश्न
Which of the following operator is an extraction operator in C++?
Can keywords be used as identifiers?
The following constant is of which type?
032
The following constant is of which type?
0XCAFE
The following constant is of which type?
04.14
Write the following real constant into the exponent form:
23.197
Write the following real constant into the exponent form:
7.214
Write the following real constant into the exponent form:
0.00005
Write about Binary operators used in C++.
Consider the following C++ statement. Are they equivalent?
char ch = 67;
char ch = ‘C’;
