Exam 6: Io Streams As an Introduction to Objects and Classes

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

We have a file that has a name in it, but the name is written one character per line. We need to write this name to the screen. What is wrong with the following code? Ifstream fileIn; FileIn.open"file.txt"); Char ch; FileIn.getch) While!fileIn.eof)) { Cout.putch); FileIn.getch); }

(Multiple Choice)
4.8/5
(31)

The member function setf stands for

(Multiple Choice)
4.9/5
(35)

What character will be in variable c after running this code? Int x; Char c; Cin >> x; Cin)getc);

(Multiple Choice)
4.9/5
(43)

Which function returns true if the character argument is a letter?

(Multiple Choice)
4.9/5
(45)

ios::showpos is a flag that

(Multiple Choice)
4.8/5
(44)

Which of the following is the correct way to close a file stream named outFile?

(Multiple Choice)
4.8/5
(32)

If the user types in the characters 10, and your program reads them into an integer variable, what is the value stored into that integer?

(Multiple Choice)
4.7/5
(37)

Which of the following is not used when using files for input and output

(Multiple Choice)
4.9/5
(34)

The command outFile.precision2);

(Multiple Choice)
4.9/5
(31)

Which include directive is necessary for file IO

(Multiple Choice)
4.9/5
(46)

Two different objects of the same class have a different set of member functions.

(True/False)
4.9/5
(38)

All data is input and output as ____________ data.

(Short Answer)
4.7/5
(37)
Showing 41 - 52 of 52
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)