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 statements is not true?
The following constant is of which type?
39
Write the following real constant into the exponent form:
7.214
Write the following real constant into the exponent form:
0.00005
Write the following real constant into the exponent form:
0.319
Assume n = 10; what will be result of n++ and --n;?
Describe the differences between keywords and identifiers?
Determine which of the following are valid constant? And specify their type.
0.5
Determine which of the following are valid constant? And specify their type.
‘Name’
Determine which of the following are valid constant? And specify their type.
27,822
