Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hand in HW # 1 1 40 PTS (5 EACH) ANSWER CAREFULLY Read and Study section 5-1 and carefully pick the correct answer to the

image text in transcribed
Hand in HW # 1 1 40 PTS (5 EACH) ANSWER CAREFULLY Read and Study section 5-1 and carefully pick the correct answer to the following quesitions. Use QUESTION NUMBER AND letter answers in the HW 1. The class name used to declare a user defined input file is A. inFile B. ifstream C. iostream D. istream 2, which include statement must you use to define and use files A. #include B.#include C. #include D#include 3. Which of the following statements correctly declares the input file object Mylnput and initializes the file object to read the file exam.txt? A. ifstream Mylnput("exam.txt"); B Mylnput ifstream("exam.txt"); C ifstream Mylnput(exam.txt); D.Mylnput ifstream (exam.txt); 4. What is the next step in using a file, after the file has been declared with the following statement? ofstream AnsFile; A. You use the file to input a variable. B. You use the file by outputting a value to it. C.You search for a file named AnsFile. D. You open the file, and associate it with a specific file name 5. Which of the following statements correctly opens the output file object AnsFile to store answers into file myanswers.txt? A. AnsFile.open("myanswers.txt"); B. open.AnsFile("myanswers.txt"); C. open.AnsFile(myanswers.txt); D. AnsFile.open(myanswers.txt); 6. Which of the following statements will properly store the number from variable value into the output file object AnsFile? A. AnsFile >value; B. Mylnput>value; C. cin>>Mylnput >>value; D. value read.Mylnput(); 8. Which of the following statements will close the output file object AnsFile from the previous question? A. close.AnsFile; B."myanswers.txt".close; C.AnsFile.close(); D. AnsFile.close ("myanswers.txt")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

Formulate strategies and recommendations for action on HRM issues.

Answered: 1 week ago