Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 1428 Final Exam Review.

Similar presentations


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

1 CS 1428 Final Exam Review

2 Exam Format 200 Total Points
60 Points Writing Programs 45 Points Tracing Algorithms and determining results 20 Points Short answer 75 Points Multiple choice Similar to prior exams, quizzes and programming assignments Material since last exam will have more weight

3 Example Programming Problem
Write a function named findBiggest that takes an array of integers and the number of integers in the array and returns the largest integer in the array.

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 Chapter 1 20 points Types of errors Binary numbers Terminology
Conversions to/from base 10 Simple addition and subtraction Conversion to/from 2’s complement Terminology Bits, bytes kilo, mega, giga, tera What do they mean? Machine language, assembly language, high- level language Von Neumann architecture Problem solving process Types of errors

7 Chapter 2 ?? Points Variables and Identifiers Assignment
Valid identifiers Data types Integer types Floating Point types Characters Boolean Assignment Arithmetic Operators

8 Chapter 3 10 Points cin Mathematical expressions static_cast Constants
Order of precedence Combined operators (e.g. += and ++) static_cast Constants Formatted output Mixed mode operations (mixing floats and ints) File input and output

9 Chapter 4 35 Points Relational operators Truth tables if statements
Logical operators && || ! if statements if-else if-else-if

10 Chapter 5 40 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

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

12 Chapter 6 50 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 Overloading methods Look at the “signatures” Using arrays as parameters to functions

13 Chapter 7 50 Points One-dimensional arrays Printing all the elements
Declaration Assignment Using arrays as parameters Printing all the elements Finding the average of numeric elements Climate program Searching and Sorting Know what they are. Linear search

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

15 How to Study Rewrite all the programs. Redo labs.
Exam programming questions will be similar to assignments. Redo labs. Learn by doing and recognizing patterns. Don’t stay up late!! Get some sleep and eat a good breakfast.

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

17 Questions


Download ppt "CS 1428 Final Exam Review."

Similar presentations


Ads by Google