aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt
diff options
context:
space:
mode:
authorJordanHT-OIT <[email protected]>2021-11-23 22:36:03 -0800
committerJordanHT-OIT <[email protected]>2021-11-23 22:36:03 -0800
commit9f6287677b9f73e33982a27d9eae8184d471fee2 (patch)
tree0ecfc26754cef62ae3cf7ca52d1be5ec8e6fa343 /CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt
parentAdd online IDE url (diff)
downloadcst115-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.txt24
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