CS 2308 Exam I Review.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Introduction to C Programming
What is a pointer? First of all, it is a variable, just like other variables you studied So it has type, storage etc. Difference: it can only store the.
C++ Data Type String A string is a sequence of characters enclosed in double quotes. Examples of strings: “Hello” “CIS 260” “Students” The empty string.
1 Chapter 2 C++ Syntax and Semantics, and the Program Development Process Dale/Weems/Headington.
1 Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation –The new operator –The delete operator –Dynamic.
1 Procedural Concept The main program coordinates calls to procedures and hands over appropriate data as parameters.
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.
1 Chapter 2 C++ Syntax and Semantics, and the Program Development Process Dale/Weems.
Exam Format  90 Total Points  60 Points Writing Programs  25 Points Tracing Code/Algorithms and determining results  5 Points Short Answer  Similar.
Exam 1 Review CS Total Points – 60 Points Writing Programs – 20 Points Tracing Algorithms, determining results, and drawing pictures – 40 Points.
Review Binary Numbers Bit : 0 or 1 Byte: 8 bites 256 different values 2 8 KB : 1024 bytes 2 10 bytes MB : 1024 * 1024 bytes 2 10 * 2 10 (2 20 ) bytes GB.
Final Exam Review CS Total Points – 60 Points Writing Programs – 50 Points Tracing Algorithms, determining results, and drawing pictures – 50.
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.
 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.
CS 1308 Exam 2 Review. Exam Format 110 Total Points 24 Points Short Answer 28 Points Fill in the Blank 16 Points T/F 36 Points Multiple Choice The above.
1 What is a Named Constant? A named constant is a location in memory that we can refer to by an identifier, and in which a data value that cannot be changed.
Lecture 15: Course Review BJ Furman ME 30 16MAY2011.
1 2/2/05CS250 Introduction to Computer Science II Pointers.
Final Exam Review CS Total Points – 20 Points Writing Programs – 65 Points Tracing Algorithms, determining results, and drawing pictures – 50.
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.
Final Exam Review CS 3358.
Test 2 Review Outline.
EGR 2261 Unit 9 One-dimensional Arrays
Chapter 2 Topics Programs Composed of Several Functions
CS 1428 Exam I Review.
Exam 3 Review.
CS1010 Discussion Group 11 Week 7 – Two dimensional arrays.
C Basics.
Object-Oriented Programming Using C++
CS 1428 Exam II Review.
Exam 2 Review CS 3358 Data Structures.
DATA HANDLING.
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.
C Stuff CS 2308.
Exam 1 Review CS 3358.
CS 1428 Exam II Review.
Pointers, Dynamic Data, and Reference Types
CS 2308 Exam I Review.
Exam 1 Review CS 3358.
Exam 2 Review CS 3358 Data Structures.
CS 2308 Exam II Review.
CS 1428 Final Exam Review.
EE 312 Software Design and Implementation I
CS 1428 Final Exam Review.
CS150 Introduction to Computer Science 1
C++ Pointers and Strings
EE 312 Exam I Review.
CS150 Introduction to Computer Science 1
Fundamental Programming
EE 312 Final Exam Review.
Strings …again.
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 130 Total Points 70 Points Writing Programs 35 Points Tracing Algorithms and determining results 25 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 Of what order of magnitude is a Bubble Sort?

Arrays 60 points One and two-dimensional arrays Parallel arrays Declaration of various types traversing Difference between physical and logical size Parallel arrays The tsuPod program Passing arrays as parameters

Analysis of Algorithms 12 Points Be able to look at code or algorithm and make an educated guess at the order of magnitude Look to see if the statement that is executed the most is a function of the size of the data set Know which orders are faster and slower than the others Constant time algorithms are denoted as O(1) O(log2n), O(n), O(n2), O(2n) There are more

Searching and Sorting 16 Points May have to write sequential search, but not the others. Know the algorithms and the order of magnitude of each Sequential search Binary search Bubble sort Selection sort

C programming 15 Points Header files I/O libraries No const printf and scanf No const No string data type Know how to manipulate arrays of characters Know how C string functions work Only pass by reference No bool data type

Pointers 12 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

Linux 6 Points Know the basic commands you needed to complete the last program Know how to compile and run a C program in Linux Know how to create and move around the Linux file system

Testing 6 Points Given a problem, be able to provide example inputs and outputs to test potential solutions Similar to tsuPod, but much smaller problem.

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.

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

Questions