1.

If same object name is given to different objects of different class then _____________(a) Its compile time error(b) Its runtime error(c) It’s not an error(d) Program suns smoothI got this question by my college professor while I was bunking the class.This interesting question is from Object Use topic in section Object of Object Oriented Programming

Answer»

Correct answer is (a) Its compile time error

Explanation: It is a compile time error as the COMPILER doesn’t allow the same name OBJECTS to be DECLARED more than once. Compiler produces multiple declaration errors. Every OBJECT must have a different name.



Discussion

No Comment Found

Related InterviewSolutions