C++ Programming Test

    Welcome to your C++ Programming Test

    1. A class is made abstract by declaring at least one of its functions as?
    2. A pure virtual function is specified by placing?
    3. Classes that can be used to instantiate objects are called?
    4. Which of the following is true?
    5. Where does the abstract class is used?
    6. Which class is used to design the base class?
    7. We cannot make an instance of an abstract base class
    8. We can make an instance of an abstract super class
    9. Which is the correct syntax of defining a pure virtual function?
    10. Which is the correct statement about pure virtual functions?
    11. A friend class can access ____________________ members of other class in which it is declared as friend.
    12. A friend function can be
    13. If class A is a friend of B, then B doesn’t become a friend of A automatically.
    14. Which of the following is false?
    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); }