1.

Which of the following pairs are similar?(a) Class and object(b) Class and structure(c) Structure and object(d) Structure and functionsI got this question by my college professor while I was bunking the class.The question is from Classes topic in section OOPs Concept & Features of Object Oriented Programming

Answer»

The CORRECT choice is (B) Class and structure

The BEST explanation: Class and structure are SIMILAR to each other. Only major difference is that a structure doesn’t have MEMBER functions whereas the class can have both data members and member functions.



Discussion

No Comment Found

Related InterviewSolutions