expand icon
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

النسخة 8الرقم المعياري الدولي: 978-1285867410
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

النسخة 8الرقم المعياري الدولي: 978-1285867410
تمرين 3
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.
Figure 1 Code for Exercise
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. Figure 1 Code for Exercise     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 named 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?
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 named 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?
التوضيح
موثّق
like image
like image

The given code is used to read three val...

close menu
C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith
cross icon