Paper Tayyari

Lecture 35: Streams

MCQs, short and long questions from lecture 35.Lecture 35 ki MCQs, short aur long sawal.

6 MCQs · 1 short question · 6 MCQs from past papers6 MCQs · 1 short sawal · 6 MCQs past papers se

Start mock testMock test shuru karein
DoneHal kiye 0/6
– correctsahi
1.
★ Final term 2017 (paper 1)

In C/C++, ________ are the doors through which data can enter and come out of a program.

  1. AStreams
  2. BFields
  3. CVariables
  4. DHeader files

Streams are the channels through which data flows into and out of a program.

2.
★ Final term 2017 (paper 1)

The normal source of cin object is ________.

  1. AFile
  2. BDisk
  3. CKeyboard
  4. DRAM

cin is the standard input stream, normally connected to the keyboard.

3.
★ Final term 2017 (paper 4)

The input/output streams cin and cout are ________ therefore have _______.

  1. AStructures, function
  2. BObjects, member functions
  3. CFunctions, objects
  4. DStructures, non member functions

cin and cout are stream objects, so they have member functions such as get() and put().

4.
★ Final term solved MCQs (Moaaz & Asad)

For cin, the source is normally a ________ and destination can be ______.

  1. AFile, native data type
  2. BDisk, user-define type
  3. CKeyboard, variable
  4. DFile, user-define type

cin reads from the keyboard into an ordinary variable.

5.
★ Final term solved MCQs (Moaaz & Asad)

A stream is an ordered sequence of bytes.

  1. ATrue
  2. BFalse

A stream is a sequence of bytes flowing in order.

6.
★ Final term solved MCQs (Moaaz & Asad)

The input/output streams; cin and cout are ____

  1. AOperators
  2. BFunctions
  3. CObjects
  4. DStructures

cin and cout are stream objects (of istream and ostream).