C++ Programming Questions Answers - Chapter 1

  • 1. Which of the following type of class allows only one object of it to be created

    1. Virtual class
    2. Abstract class
    3. Singleton class
    4. Friend class
    Answer :

    Option C

  • 2. what is a class in c++

    1. Class in a collection of objects
    2. Class has noting to do with object
    3. It just have declaration of few variables
    4. None of above
    Answer :

    Option A

  • 3. expression x.y represents as

    1. member x of object y
    2. member y of object x
    3. member y of object pointed by x
    4. all of above
    Answer :

    Option B

  • 4. Which is not C++ storage class

    1. auto
    2. register
    3. static
    4. iostream
    Answer :

    Option D

    Explanation:

    Storage classes are:

    auto
    register
    static
    extern

  • 5. If no constructor is there, then compiler assumes the class to have a default constructor with no arguments

    1. True
    2. False
    Answer :

    Option A

  • 6. Meaning of STL

    1. Standard Tree Library
    2. Standard Term Library
    3. Standard Template Library
    4. None of above
    Answer :

    Option C

  • 7. If value has not type, then the pointer pointing to this value will be known as

    1. Empty pointer
    2. Null pointer
    3. Void pointer
    4. None of above
    Answer :

    Option C

Please Like Us