wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSNP-04103 C++ Chapter 8 - Get & Put

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

A stream is?

a)

An array of characters

b)

A matrix of characters

c)

A sequence of characters

d)

All of the above

2.

get and put are part of the __________ library ?.

a)

<string>

b)

<sstring>

c)

<iostring>

d)

<iostream>

3.

Does the command cin process one character at a time?

a)

True

b)

False

4.

Does the get command takes into consideration leading white spaces?.

a)

Yes

b)

No

5.

What are the delimiters for the "cin" command?.

a)

Special characters such as \t

b)

White spaces

c)

New line \n

d)

The & sign

6.

What library is used to interact with external files?.

a)

<iostring>

b)

<iostream>

c)

<fstream>

d)

<sstring>

7.

These are the characteristics of interactive processing (OLTP)?.

a)

Requires use of data files

b)

Ok for smaller programs

c)

Expect user input from the keyword

d)

Input file can be read many times

8.

What is the command to declare an input file stream?.

a)

ofstream

b)

ifstream

c)

sstream

d)

iostream

9.

The command "getline" is used for?

a)

Extracting one character at a time.

b)

Extracting multiple characters at a time

c)

Extracting two characters at a time

d)

Locate the buffer pointer

10.

The boolalpha command does?.

a)

Sets the precision to the argument.

b)

A decimal point will not be displayed for boolean numbers

c)

Skip white spaces on input

d)

Enables false and true to be extracted from the input stream or inserted into the output stream.