1.

Which syntax is applicable to declare public member functions in C++?(a) public: (b) public()(c) public void (d) public::I got this question in an international level competition.This interesting question is from Public Member Functions in section Member Functions & its Types of Object Oriented Programming

Answer»

Right option is (a) public:

The best I can EXPLAIN: The syntax in C++ MUST contain the public keyword followed by a colon. THEREAFTER, all the public members can be DECLARED. But in few other LANGUAGE, public have to be mentioned explicitly with each member.



Discussion

No Comment Found

Related InterviewSolutions