Fall 2018

PIC 10A: Introduction to Programming

Discussion Section 2B 2C

Wonjun Lee



Week10

Some Codes

About fstream

- Try running this code with a dat file. This will open number.dat file and print out all the numbers in the dat file. simple.cpp - number.dat

- This uses getline to print out all the lines from words.dat file. fstream.cpp - words.dat


Quiz about global_variables

- global_variable.cpp

Q and A

These are some questions asked by students by email. I hope this will be helpful for your final exam preparation. Good luck!

(Special thanks to Cinthiya Chander and Zhiyuan Ren)

- QA.pdf