C++ Programming Test By Kishor Raut - August 11, 2021 FacebookTwitterPinterestWhatsApp Welcome to your C++ Programming Test 1. A class is made abstract by declaring at least one of its functions as?A. impure virtual functionB. pure virtual functionC. pure abstract functionD. impure abstract function 2. A pure virtual function is specified by placing?A. -1B. 0C. 1D. infinite 3. Classes that can be used to instantiate objects are called?A. concrete classesB. interfaceC. abstract classD. None of the above 4. Which of the following is true?A. The C++ interfaces are implemented using abstract classesB. The purpose of an abstract class is to provide an appropriate base class from which other classes can inherit.C. Abstract classes cannot be used to instantiate objects and serves only as an interface.D. All of the above 5. Where does the abstract class is used?A. base class onlyB. derived classC. both derived & base classD. virtual class 6. Which class is used to design the base class?A. abstract classB. derived classC. base classD. derived & base class 7. We cannot make an instance of an abstract base classA. TRUEB. FALSE 8. We can make an instance of an abstract super classA. TRUEB. FALSE 9. Which is the correct syntax of defining a pure virtual function?A. pure virtual return_type func();B. virtual return_type func() pure;C. virtual return_type func() = 0;D. virtual return_type func(); 10. Which is the correct statement about pure virtual functions?A. They should be defined inside a base classB. Pure keyword should be used to declare a pure virtual functionC. Pure virtual function is implemented in derived classesD. Pure virtual function cannot implemented in derived classes 11. A friend class can access ____________________ members of other class in which it is declared as friend.A. privateB. protectedC. publicD. Both A and B 12. A friend function can beA. A method of another classB. A global functionC. Both A and BD. None of the above 13. If class A is a friend of B, then B doesn’t become a friend of A automatically.A. TRUEB. FALSE 14. Which of the following is false?A. Friendship is not inheritedB. The concept of friends is there in Java.C. Both A and BD. None of the above 15. What will be output for the followiing code? #include class A { private: int a; public: A() { a = 0; } friend class B; // Friend Class }; class B { private: int b; public: void showA(A& x) { std::cout << ""A::a="" << x.a; } }; int main() { A a; B b; b.showA(a); }A. A::a=0B. AC. a=0D. A::0 Time is Up!