GATE-Programming Methodology Questions and Answers
Practice ModeShowing 10 of 105 questions
Q91
Assume num= 8;. The value of the expressionnum ++ is ...........
Answer: Option C
Q92
If the ++ operator is overloaded properly, to operator ++ () function returns
Answer: Option C
Q93
If the ++ operator is overloaded properly, the operator++ () function returns
Answer: Option C
Q94
To overload a prefix ++ for a Number class, an appropriate function header is
Answer: Option C
Q95
The << operator is used for output only when
Answer: Option C
Q96
Object-oriented programmers primarily focus on
Answer: Option C
Q97
If the <<operator has been overloaded appropriately for the class Number, and a and b are members of the Numbers class, then which statement is legal ?
Answer: Option C
Q98
Using an overloaded << operator for a class
Answer: Option C
Q99
Which of the following is the best prototype to overload the << operator for a Number class?
Answer: Option B
Q100
If you use an = operator with classes, then
Answer: Option B