Cpp Programming Quiz 131 – Which of the following can be overloaded?
Question: Which of the following can be overloaded? [A]. Object [B]. Functions[C]. Operators [D]. Both B and C Answer: Option D
Question: Which of the following can be overloaded? [A]. Object [B]. Functions[C]. Operators [D]. Both B and C Answer: Option D
Question: Which of the following statements is correct when a class is inherited publicly? [A]. Public members of the base class become protected members of derived class. [B]. Public members of the base class become private members of derived class.[C].…
Question: Which of the following statements is correct about the constructors and destructors? [A]. Destructors can take arguments but constructors cannot. [B]. Constructors can take arguments but destructors cannot.[C]. Destructors can be overloaded but constructors cannot be overloaded. [D]. Constructors…
Question: Constructor is executed when _____. [A]. an object is created [B]. an object is used[C]. a class is declared [D]. an object goes out of scope. Answer: Option A
Question: Which of the following statements is correct? [A]. Data items in a class must be private. [B]. Both data and functions can be either private or public.[C]. Member functions of a class must be private. [D]. Constructor of a…
Question: Which of the following statements is incorrect? [A]. Friend keyword can be used in the class to allow access to another class. [B]. Friend keyword can be used for a function in the public section of a class.[C]. Friend…
Question: Which of the following statements are correct for a static member function? It can access only other static members of its class. It can be called using the class name, instead of objects. [A]. Only 1 is correct. [B].…
Question: Which of the following can access private data members or member functions of a class? [A]. Any function in the program. [B]. All global functions in the program.[C]. Any member function of that class. [D]. Only public member functions…
Question: Which of the following two entities (reading from Left to Right) can be connected by the dot operator? [A]. A class member and a class object. [B]. A class object and a class.[C]. A class and a member of…
Question: Which of the following keywords is used to control access to a class member? [A]. Default [B]. Break[C]. Protected [D]. Asm Answer: Option C