Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C++ - QUESTIONS : PART 36

Overloading the function operator

requires a class with an overloaded operator.
requires a class with an overloaded [ ] operator.
allows you to create objects that act syntactically like functions.
usually make use of a constructor that takes arguments.
SHOW ANSWER

The operator that cannot be overloaded is

++ 
 ::
( )
 ~
SHOW ANSWER

Which of the following statements is NOT valid about operator overloading?

Only existing operators can be overloaded.
Overloaded operator must have at least one operand of its class type.
The overloaded operators follow the syntax rules of the original operator.
none of the above.
SHOW ANSWER

Overloading a postfix increment operator by means of a member function takes

no argument
one argument
two arguments
three arguments
SHOW ANSWER

Which of the following operator can be overloaded through friend function?

 ->
 =
( )
 *
SHOW ANSWER

Which of the following statement is valid?

We can create new C++ operators.
We can change the precedence of the C++ operators.
We can change the associativity of the C++ operators.
We can not change operator templates.
SHOW ANSWER

One can change the precedence of an operator when overloading it

True 
 False
SHOW ANSWER

When overloading operators, we can also create our own new operators.

True
false
SHOW ANSWER

Overloading without explicit arguments to an operator function called

Binary operator overloading
Unary operator overloading
Class allowing access to another class
None of these
SHOW ANSWER

How many parameters does a conversion operator may take?

0
1
2
 as many as possible
SHOW ANSWER

Operator overloading is ?

giving new meaning to existing c++ operators
making c++ operators work with objects
giving c++ operators more than they can handle
making new c++ operators
SHOW ANSWER

How many operators are supported by C++?

30 operators
40 operators
45 operators
65 operators
SHOW ANSWER

What following operator is called ?:

Scope Resolution Operator


Conditional Operator


Ternary Operator


if else o/p
SHOW ANSWER

Which operator can not be overloaded?

+
 -
 *
 ::
SHOW ANSWER

Which operator has more precedance  in below list?

+
-
 ++
 *
SHOW ANSWER

What should be the output of below prpgram?
int main()
{
int a=10; cout<<a++;
return 0;

11
10
 Error
 0
SHOW ANSWER

What is output of below program?
int main()
{
  const int a=10;
  a++;
  cout<<a;
return 0;

10
11
Compilation Error
Linking Error
SHOW ANSWER

Which operator has highest precedence in * / % ?

*
 /
%
 all have same precedence
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in