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?
________________________________________________________________________
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.