C++ Programming Questions Answers - Chapter 1

  • 15. Which of the following cannot be inherited from the base class

    1. Constructor
    2. Friend
    3. Both A and B cannot be inherited
    4. Both A and B can be inherited
    Answer And Explanation

    Answer: Option C

  • 16. cout is declared in the _____ standard file within the std namespace

    1. outstream
    2. stdin
    3. iostream
    4. None of above
    Answer And Explanation

    Answer: Option C

  • 17. How we mark the end of c++ statement

    1. ;
    2. :
    3. >>
    4. <<
    Answer And Explanation

    Answer: Option A

  • 18. Dereference operator is also called as

    1. pointer
    2. Reference operator
    3. Offset operator
    4. Deoffset operator
    Answer And Explanation

    Answer: Option C

  • 19. ios::ate is used for

    1. Set the initial position at the start of the file
    2. Set the last position at the end of the file
    3. Set the initial position at the end of the file
    4. Set the last position at the start of the file
    Answer And Explanation

    Answer: Option C

  • 20. Which class has only one unique value for all the objects of class

    1. this
    2. friend
    3. static
    4. none of above
    Answer And Explanation

    Answer: Option C

  • 21. Which of the following functions below can be used Allocate space for array in memory

    1. calloc()
    2. malloc()
    3. realloc()
    4. All of above
    Answer And Explanation

    Answer: Option A