Problem

Opening Files and Performing File Input In this exercise, you use what you have learne...

Opening Files and Performing File Input

In this exercise, you use what you have learned about opening a file and getting input into a program from a file. Study the following code, and then answer Questions 1-3.

1. Describe the error on line 1, and explain how to fix it.

________________________________________________________________________

2. Describe the error on line 2, and explain how to fix it.

________________________________________________________________________

3. Consider the following data from the input file myDVDFile.dat:

Fargo 8.00 1A

Amadeus 20.00 2C

Casino 7.50 3B

a. What value is stored in the variable named dvdName?

________________________________________________________________________

b. What value is stored in the variable name dvdPrice?

________________________________________________________________________

c. What value is stored in the variable named dvdShelf?

________________________________________________________________________

d. If there is a problem with the values of these variables, what is-the problem and how could you fix it?

________________________________________________________________________

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 7
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT