1.

If a new operator is defined for a class and still global new operator have to be used, which operator should be used with the keyword new?(a) Colon(b) Arrow(c) Dot(d) Scope resolutionI have been asked this question during an online exam.Query is from New Operator in division Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

The correct ANSWER is (d) Scope resolution

The best I can EXPLAIN: As USUAL, scope resolution operator is used to get the scope of parent or the global entities. Hence we can use scope resolution operator with the NEW operator to call the global new operator even if new operator is defined for the class EXPLICITLY.



Discussion

No Comment Found

Related InterviewSolutions