CS 2308 Exam I Review.

Slides:



Advertisements
Similar presentations
Chapter 9 Pointers and Dynamic Arrays. Overview 9.1 Pointers 9.2 Dynamic Arrays.
Advertisements

A pointer is the memory address of a variable. A memory address is a physical location within a system’s memory space. A pointer variable is variable used.
1 Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation –The new operator –The delete operator –Dynamic.
Pointers CS362. Pointers A Pointer is a variable that can hold a memory address Pointers can be used to: Indirectly reference existing variables (sometimes.
 200 Total Points ◦ 74 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 36 Points Short Answer ◦ 30 Points Multiple Choice.
Exam Format  90 Total Points  60 Points Writing Programs  25 Points Tracing Code/Algorithms and determining results  5 Points Short Answer  Similar.
CS102 Introduction to Computer Programming Chapter 9 Pointers.
Exam 1 Review CS Total Points – 60 Points Writing Programs – 20 Points Tracing Algorithms, determining results, and drawing pictures – 40 Points.
Final Exam Review CS Total Points – 60 Points Writing Programs – 50 Points Tracing Algorithms, determining results, and drawing pictures – 50.
1 Workin’ with Pointas An exercise in destroying your computer.
Lecture 6 C++ Programming Arne Kutzner Hanyang University / Seoul Korea.
 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.
CSE 232: C++ memory management Overview of Arrays Arrays are the simplest kind of data structure –One item right after another in memory (“contiguous range”
 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice.
11/10/2016CS150 Introduction to Computer Science 1 Last Time  We covered “for” loops.
1 Object-Oriented Programming Using C++ A tutorial for pointers.
1 2/2/05CS250 Introduction to Computer Science II Pointers.
 Memory setup  Pointer declaration  Address operator  Indirection  Printing addresses or pointers.
Final Exam Review CS Total Points – 20 Points Writing Programs – 65 Points Tracing Algorithms, determining results, and drawing pictures – 50.
Copyright © 2006 Pearson Addison-Wesley. All rights reserved Learning Objectives  Pointers  * symbol and & symbol  Pointer operations  Pointer.
Exam 2 Review CS 3358 Data Structures. 90 Total Points – 50 Points Writing Programs – 25 Points Tracing Algorithms, determining results, and drawing pictures.
CS 1428 Exam I Review. Exam Format 130 Total Points – 40 Points Writing Programs – 30 Points Tracing Algorithms and determining results – 20 Points Short.
CS 1428 Final Exam Review. Exam Format 200 Total Points – 60 Points Writing Programs – 45 Points Tracing Algorithms and determining results – 20 Points.
Pointers A variable that holds an address value is called a pointer variable, or simply a pointer.  What is the data type of pointer variables? It’s not.
Final Exam Review CS 3358.
Pointers What is the data type of pointer variables?
Command Line Arguments
CS 1428 Exam I Review.
Learning Objectives Pointers Pointer in function call
CS 1428 Exam II Review.
Andy Wang Object Oriented Programming in C++ COP 3330
Exam 2 Review CS 3358 Data Structures.
DATA HANDLING.
Pointers and References
CS 2308 Final Exam Review.
CS 2308 Exam I Review.
CS 2308 Exam II Review.
CS 2308 Exam II Review.
CS 2308 Exam II Review.
Exam 2 Review CS 3358 Data Structures.
CS 1428 Exam I Review.
Exam 1 Review CS 3358.
CS 2308 Exam I Review.
CS 1428 Exam II Review.
Pointers, Dynamic Data, and Reference Types
Exam 1 Review CS 3358.
Counting Loops.
Exam 2 Review CS 3358 Data Structures.
CS 2308 Exam II Review.
CS 1428 Final Exam Review.
EE 312 Software Design and Implementation I
5.1 Introduction Pointers Powerful, but difficult to master
Pointers Lecture 1 Thu, Jan 15, 2004.
CS 1428 Final Exam Review.
CS150 Introduction to Computer Science 1
C++ Pointers and Strings
EE 312 Exam I Review.
Fundamental Programming
EE 312 Final Exam Review.
Chapter 9: Pointers and String
Pointers and dynamic objects
Pointers and References
ENERGY 211 / CME 211 Lecture 10 October 13, 2008.
C++ Pointers and Strings
EE 312 Software Design and Implementation I
EE 312 Exam I Review.
Pointers, Dynamic Data, and Reference Types
CS 1428 Exam I Review.
CS 2308 Final Exam Review.
EE 312 Exam I Review.
Presentation transcript:

CS 2308 Exam I Review

Exam Format 80 Total Points 60 Points Writing Programs 15 Points Tracing Code/Algorithms and determining results 5 Points Short Answer Similar to quizzes and programming assignments

Example Programming Problem Write a function that accepts two parameters: an array of integers and the number of integers in the array. Return an integer representing the number of odd integers in the array.

Example Tracing Problem What will the EXACT output of the following program be? int foo = 9; int *ptr = &foo; float foo2 = 5.7; *ptr = 2; foo2 = foo - foo2; if (foo > foo2) cout << "Hello!"; else if (foo < foo2) cout << foo2; else cout << foo; cout << endl; cout << "foo2 is: " << fixed << setprecision(1) << foo2 << endl;

Example Short Answer Why would we rarely use the equality operator when comparing floating point values?

Arrays 45 points 2-D arrays One and two-dimensional arrays Declaration of various types traversing Difference between physical and logical size Passing arrays as parameters Arrays of records Understand tsuPod program Strings Know how to use the string functions such as length(), substr() Know how to use a string like an array of characters Understand BioHelp and Exam Grader programs 2-D arrays Understand Game of Life program

Structures 15 points Know how to declare a structure Know how to access the fields in a structure Arrays of structures Understand tsuPod program

Pointers 15 Points A pointer is a variable that holds the address of a memory location Declaration int *ptr; Assignment ptr = &foo; //& is the address function Dereferencing *ptr = 54; //same as foo=54; You can point to any kind of data type Relationship between arrays and pointers Understand the “new” and “delete” commands

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

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

Questions