GATE-Programming Methodology Questions and Answers
Practice ModeShowing 10 of 105 questions
Q81
If an operator is normally defined to be only unary, then you
Answer: Option D
Q82
When you overload an operator for use with your classes, you
Answer: Option C
Q83
You overload an operator by naming it a
Answer: Option C
Q84
Assuming you have properly overloaded the ! operator for a Number class, and that a and b are two members of the Number class, which expression is legal?
Answer: Option A
Q85
To perform multiple arithmetic operations in a single statement, overloaded operator functions should return
Answer: Option C
Q86
Which of the following is the best function prototype for an overloaded .......... for a Number class ?
Answer: Option A
Q87
The programming language feature that allows the same operation to be carried out differently depending on the object is
Answer: Option A
Q88
Specifically, overloading involves
Answer: Option B
Q89
A usable function header for an overloaded operator for a Number class is
Answer: Option C
Q90
If the >> operator is overloaded properly for use for input with a number class, and a and b are member of the Number class, which of the following statement is allowed ?
Answer: Option A