CS 1428 Final Exam Review - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

CS 1428 Final Exam Review

Description:

... since last exam will have more weight Example Programming Problem Write a function named findSmallest that takes an array ... one errors Understand ... One ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 19
Provided by: Bruce423
Category:

less

Transcript and Presenter's Notes

Title: CS 1428 Final Exam Review


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 lt foo)
  • if (foo2 gt 3.14)
  • cout ltlt str ltlt bigger than PI! ltlt
    endl
  • foo - 2
  • else
  • cout ltlt foo ltlt loser ltlt 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
  • Binary numbers
  • Conversions to/from base 10
  • Simple addition and subtraction
  • Conversion to/from 2s 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
  • Valid identifiers
  • Data types
  • Integer types
  • Floating Point types
  • Characters
  • Boolean
  • Assignment
  • Arithmetic Operators

9
Chapter 3
  • 10 Points
  • cin
  • Mathematical expressions
  • 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
  • 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
  • Declaration
  • Assignment
  • Using arrays as parameters
  • Printing all the elements
  • Finding the average of numeric elements
  • Its 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.
  • Exam programming questions will be similar to
    assignments.
  • Redo labs.
  • Learn by doing and recognizing patterns.
  • Dont 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
Write a Comment
User Comments (0)
About PowerShow.com