diff options
| author | JordanHT-OIT <[email protected]> | 2021-11-23 22:36:03 -0800 |
|---|---|---|
| committer | JordanHT-OIT <[email protected]> | 2021-11-23 22:36:03 -0800 |
| commit | 9f6287677b9f73e33982a27d9eae8184d471fee2 (patch) | |
| tree | 0ecfc26754cef62ae3cf7ca52d1be5ec8e6fa343 /CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt | |
| parent | Add online IDE url (diff) | |
| download | cst115-lab8-jordanht-oit-9f6287677b9f73e33982a27d9eae8184d471fee2.tar.xz cst115-lab8-jordanht-oit-9f6287677b9f73e33982a27d9eae8184d471fee2.zip | |
Temporary commit
Diffstat (limited to 'CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt')
| -rw-r--r-- | CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt b/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt new file mode 100644 index 0000000..d173b1f --- /dev/null +++ b/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt @@ -0,0 +1,24 @@ +13a - CH11.7 Exercises: + +#5: +if(!testFile.fail) //Part a +{ + testFile >> lname[0] >> id[0] >> age[0]; //Part b + cout << lname[0] << " " << id[0] << " " << age[0] << " " << endl; + + while(!testFile.eof()) + { + index++; + testFile >> lname[index] >> id[index] >> age[index]; + cout << lname[index] << " " << id[index] << " " << age[index] << " " << endl; + } + + testFile.close(); //Part c +} + +#6: +a) False: RAM is much faster; RAM is faster than everything else except for the CPU's cache and registers +b) True: Who knows what strange files people will feed into your program. +c) True: Since you've read in the data, and know what you've modified, why would you need to read it again? (Unless its realy big) +d) True: Unless you don't need to know how much you've read for some reason. There are workarounds if you forget. +e) True: The OS will put an EOF in the file if there is not one already.
\ No newline at end of file |