MULTIPLE CHOICE QUESTIONS AND ANSWERS
  1. Object _______ and operator _______ are used for reading.
    1. cin >>
    2. cout >>
    3. cin <<
    4. cout <<
    5. none of the above

    Answer: (a)

  2. For reading with cin object, we need to include __________file.
    1. conio.h
    2. fstream.h
    3. stdio.h
    4. iostream.h
    5. none of the above

    Answer: (d)

  3. Manipulators without parameters such as endl, hex, dec etc are defined in __________ file.
    1. iomanip.h
    2. conio.h
    3. io.h
    4. fstream.h
    5. none of the above

    Answer: (e)

  4. Of the following, _________ is not a manipulator.
    1. dec
    2. scientific
    3. endl
    4. flush
    5. hex

    Answer: (b)

  5. Of the following _________ is not an ios flag.
    1. dec
    2. showbase
    3. hex
    4. flush
    5. None of these

    Answer: (d)

  6. Statement cin >> ch ; will start executing when we press _______ key.
    1. any
    2. any character
    3. only character
    4. escape
    5. enter ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.