Final Exam
Study Guide

Chapter (1), Chapter (2), Chapter (3), and Chapter (4) - All sections
Chapter (5) - Sections 5.1, 5.2, 5.3
Chapter (7) - All Sections
Chapter (9) - Sections 9.1, 9.2, 9.3
In addition, for arrays: Lab (10) and all examples and handouts given in class on arrays.

Study Guide:
For the final exam a student must:

1) Be able to design the algorithm for solving a given problem.
2) Be able to define functions and correctly define parameters and their types.
3) Be able to use different techniques for reading Input files and writing to Output files.
4) Know different types of variables and be able to use them appropriately.
5) Be able to implement mathematical expressions.
6) Be able to define and properly use the local and global variables
7) Be able to use overloading in a code.
8) Knows the difference between call_by_value and call_by_reference.
9) Be able to properly define a function with the correct type.
10) Formatting output and manipulators.
11) Be able to read the entire contents of a file or a line. Be able to correctly use get, put, eof, etc ....
12) Be able to define Boolean variables and to determine the outcome of a Boolean Expression.
13) Be able to correctly use if, if ... else, if ... else if ... else and switch statements.
14) Be able to correctly implement the switch statement.
15) Be able to correctly implement for loop, while loop, and do while
16) Be able to define 1 dimensional array of different types and correctly use them in a code.
17) Know how to pass arrays as parameters to a function.
18) Be able to perform arithmetic operations on members of an array.
19) Be able to apply the string operators, strlen, strcpy, strcmp, and getline.

In addition, students must be able to debug a code and find and correct the errors in a C++ code.  Students must be able to determine the output of a code segment and the its purpose.

Here are some of the questions that you may work on for practice.  Please note that the purpose of these questions is to help you learn more about arrays.

1) How do we compare the contents of two files and display the differences between the two files in a third file.  The comparison here is a one-to-one comparison between every character in the first file and the corresponding character in the second file. Every time that a difference was observed, a number marking the order of the characters and both characters will be written to an output file.  For instance:
File (1)
Hi my name is Tom.
File (2)
Hi my name is Tod !

The output should look like this:
17 m d
18 .
19    !

Letter m is the 17th character on the line given above.

2) Using arrays, write a C++ code that capitalizes any character that appears after 2 blank spaces.

3) A file contains information on some students.  This file is formatted as following:
ID(2-digit integer)  ZipCode(5 digit integers)  Last Name(up to 15 chars)   First Name(up to 15 chars)

Use the getline to read the entire contents of this file one line at a time and write the student information to an output file in the following format (Every item is separated by a tab):

Last Name      First Name       ID

4) Write a code that asks users to enter two names and determine which one has more characters, and how many more?

5) Write a code to read a series of integers from an input file and write one set of values without repetition in one file and the repeated values in another file.

6) Write a code to ask users to input a word and displays the word on the screen with the middle letter capitalized.  If the length is an odd number capitalize the middle letter.  If the length is an even number, capitalize the two letters in the middle.