C++ Programming Test

    Welcome to your C++ Programming Test

    1. What will be output for the following code? class Box { int capacity; public: void print(); friend void show(); bool compare(); friend bool lost(); };
    2. Which keyword is used to represent a friend function?
    3. Which of the following is correct about friend functions?
    4. Pick the correct statement.
    5. Where does keyword ‘friend’ should be placed?
    6. Space taken by bitset bs is less than?
    7. What is true about bitset?
    8. The size of bitset is fixed at compile time that is, it can’t be changed at runtime.
    9. Which bitset method tests whether all bits from bitset are set or not?
    10. Which bitset method toggles all bits from bitset?
    11. bitset::hash() used for?
    12. Which of the following is the limitation of bitset over vector bool?
    13. Which operator is used to access the nth bit in a bitset?
    14. How many ways are there for constructing a bitset?
    15. What is the default value of a bitset?