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 findSmallest that takes an array of integers and the number of integers in the array and returns the smallest 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 Example Multiple Choice
To allow file access in a program, you must #include this header file: a. file b. fileaccess c. fstream d. cfile

7 Chapter 1 0 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

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

9 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

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

11 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

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

13 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

14 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 It’s Hot Out There! Searching and Sorting Know what they are. Linear search

15 Chapter 11 20 Points Structures Know how to declare a structure
Know how to access the fields in a structure Arrays of structures Understand Are We There Yet? program

16 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.

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

18 Questions


Download ppt "CS 1428 Final Exam Review."

Similar presentations


Ads by Google