Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 1428 Exam II Review.

Similar presentations


Presentation on theme: "CS 1428 Exam II Review."— Presentation transcript:

1 CS 1428 Exam II Review

2 Exam Format 110 Total Points
60 Points Writing Programs 30 Points Tracing Algorithms and determining results 20 Points Short Answer Similar to quizzes and programming assignments

3 Example Programming Problem
Write a function named getBigger that takes an integer parameter, prompts the user for a number, and then returns the higher of the two numbers.

4 Example Tracing Problem
What will the EXACT output of the following program be? int foo = 9; string str = "Hey!"; float foo2 = 5.7; while (foo2 < foo) { if (foo2 > 3.14) { cout << str << “ bigger than PI!” << endl; foo -= 2; } else cout << foo << “loser” << endl;

5 Example Short Answer Why do we need function prototypes before the main function?

6 Everything from Ch1-4 Need to know everything from first exam

7 Chapter 5 45 points Definite vs. indefinite iteration while loops
Body of the loop Loop guard Infinite loops for loops Initialization Condition Progression Reading from an input file Read until EOF sentinel value Known size

8 Chapter 5 (cont.) Nested loops Off-by-one errors
Understand the MathStuff and ATM programs do-while statement will not be on exam

9 Chapter 6 55 Points Functions Prototypes Definitions Function calls
Parameter lists Return types return statement Parameters Difference between “formal” and “actual” Pass by value and pass by reference

10 Machine Organization 20 Points Execution cycle
von Neumann architecture Stored program concept Remember the diagram Execution cycle Fetch-decode-execute How is information represented? integer character floating point

11 How to Study Rewrite all the programs. Redo labs.
Learn by doing and recognizing patterns. Don’t stay up late!! Get some sleep and eat a good breakfast.

12 What to bring Pencils and erasers We will provide scratch paper
No calculators

13 Questions


Download ppt "CS 1428 Exam II Review."

Similar presentations


Ads by Google