Input/output

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

the iostream header file

In any program that uses the cin object, you must #include __

expression

Program code that can be evaluated to a value is called a

cin

The ________ object causes data to be input from the keyboard.

>> , <<

The ________ operator always follows the cin object, and the ________ operator follows the cout object.

setw

The ________ stream manipulator can be used to establish a field width for the value immediately following it.

one or more stream extraction (>>) operators

The cin object must be followed by ________.

does none of above

The statement cout << setw(4) << num4 << " "; ________.

All the above statements must be true.

Before a program can read data from a file, which of the following must be true?

The file must be opened.

Before a program can read data from a file, which of the following must be true?

The file must exist and data to be read from it must have been previously stored in it.

Before a program can read data from a file, which of the following must be true?

The program must define a file stream object to associate with the file.

Before a program can read data from a file, which of the following must be true?

There must be a #include directive in the program.

Before a program can read data from a file, which of the following must be true?

iomanip

To use stream manipulators, you should include the ________ header file.

FALSE

True/False: If the value of dollars is 5.0, the following statement will output 5.00 to the monitor: cout << fixed << showpoint << setprecision(4) << dollars << endl;

TRUE

True/False: The cin object can be used to input more than one value in a single statement.

FALSE

True/False: The cin object lets the user enter a string that contains embedded blanks.

FALSE

True/False: The setw manipulator is used to set the precision of a number.

The cin object

________ causes a program to wait until information is typed at the keyboard and the Enter key is pressed.


Set pelajaran terkait

Pneumothorax, Hemothorax, and Flail Chest

View Set

ETHICAL HACKING - CHAPTER 11 - MC QUESTIONS

View Set

NU 210: Intro to Nursing Informatics

View Set

Macroeconomics Chapter 6 Homework

View Set

Assignment 7 - Structure: Axioms

View Set

Tieng anh 4 Unit 15: When is Children's Day

View Set