qz5_ver2_sol

qz5_ver2_sol - UCR CS010: Winter 2004 Introduction to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Computer Science I Kris Miller Quiz 5: Lecture Sections 003 1. Which include directive is necessary if you want to use the function exit ? a. #include <fstream> b. #include <cmath> c. #include <cstdlib> d. #include <fileIO> e. An include directive is not necessary to use the function exit . 2. Which include directive is necessary for file IO? a. #include <fstream> b. #include <cmath> c. #include <cstdlib> d. #include <fileIO> e. An include directive is not necessary for file IO. 3. Which statement correctly opens an output stream named outFile and attaches it to a file name output.dat? a. outFile = output.dat; b. outFile = "output.dat"; c. outFile.open("output.dat"); d. outFile.open(output.dat); e. open(outFile, “output.dat”) 4. A function that is associated with an object is called a(n) _________ function. a. instantiated b. void c. input d. output e. member 5. Which of the following is the correct way to close a file stream named outFile? a.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

qz5_ver2_sol - UCR CS010: Winter 2004 Introduction to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online