COSC 1435 Exam 2 Review
The exam will be given on April 10th, during regular class hours. You will
have an hour and 15 minutes to complete the exam. The exam will cover Gaddis
chapters 5 - 6. I will provide a language reference from the inside front and
back cover of the text. No calculators or other electronic aids are allowed.
Most of the exam will be problems, of three basic types:
- Coding. You will be given a simple problem and be asked to code part of
the program, typically a function. These problems will be small and directly
reflect what we have discussed in class (including group projects) and programs
written for labs.
- You will be given a code segment or a complete program and asked to look
at the code and determine what will be the result of running this code.
- You will be given a code segment and asked to determine why the code did
not correctly compile
There will be some short answer questions that reflect the quizzes, checkpoints,
and review questions. There are no true/false or multiple choice questions.
Here is an
example exam. This exam is designed to prepare you for the second exam in COSC
1435. It is significantly more difficult and longer than the actual exam, but
if you can successfully complete this exam, you should be well prepared for
the actual exam. But, remember that there will be areas and types of problems
not covered in this exam that will be included in the actual exam.
Know all of the material from Exam 1.
Gaddis, Chapter 5 - Looping
- Understand the increment and decrement operators
- Understand and be able to use a while loop, do while loop,
and for statement
- What are sentinels used for?
- Know when and how to use a break statement
Gaddis, Chapter 6 - Functions
- Understand how a function is defined and called, including function prototypes
- What is the difference between arguments and parameters?
- Give examples of passing by reference and passing by value. Be able to give
examples of when each should be used
- Know how values are returned from functions
- What is the difference between local and global variables?
- What is an overloaded function?
- How do we use stubs and drivers?