You are on page 1of 1

Object Oriented Programming

Object Oriented Programming


Lab 12
SEF15A
Instructions:

 Work on your own in the lab task. No collaboration is allowed; otherwise it


would result in 'F'. You can use your books, notes, handouts etc. but you are
not allowed to borrow anything from your peer student.
 NO Evaluation will be done after lab.

 Show your work to the instructor or TA before leaving the lab to get some or
full credit.
 Program the following tasks in your Microsoft C++ compiler and then
compile and execute them. The name of your files will be according to the
task given in this lab.
 Best of Luck.

Lab Task # 1:

Write a C++ program, which initializes a string variable to the content "Time is a
great teacher but unfortunately it kills all its pupils. Berlioz" and outputs the string
to the disk file OUT.TXT

Lab Task # 2:

Write a function in C++ to print the count of word the as an independent word in a
text file STORY.TXT.
For example, if the content of the file STORY.TXT is
There was a monkey in the zoo. The monkey was very naughty.

Then the ouput of the program should be 2

Instructor: Maria Rana Page 1

You might also like