Advertisements
Advertisements
Question
Write about Binary operators used in C++.
Advertisements
Solution
Binary Operators require two operands:
Arithmetic operators that perform simple arithmetic operations like addition, subtraction, multiplication, division (+, -, *, %, /), etc. are binary operators which require a minimum of two operands.
Relational operators are used to determining the relationship between their operands. The relational operators (<, >, >=, <=, ==, !=) are applied on two operands, hence they are binary operators. AND, OR (logical operator) both are binary operators. The assignment operator is also a binary operator (+=, – =, *=, /=, %=).
APPEARS IN
RELATED QUESTIONS
Which of the following statements is not true?
Which of the following is called compile-time operators?
What are keywords?
Can keywords be used as identifiers?
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;?
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 |
Consider the following C++ statement. Are they equivalent?
char ch = 67;
char ch = ‘C’;
Determine which of the following are valid constant? And specify their type.
‘Name’
