EE 312 Exam I Review.

Slides:



Advertisements
Similar presentations
Data Structure Lecture-3 Prepared by: Shipra Shukla Assistant Professor Kaziranga University.
Advertisements

Senem Kumova Metin Spring2009 STACKS AND QUEUES Chapter 10 in A Book on C.
Unions The storage referenced by a union variable can hold data of different types subject to the restriction that at any one time, the storage holds data.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 15: Linked data structures.
 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.
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.
Exam Format  105 Total Points  25 Points Short Answer  20 Points Fill in the Blank  15 Points T/F  45 Points Multiple Choice  The above are approximations.
 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.
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.
What we will cover A crash course in the basics of C “Teach yourself C in 21 days”
Fun fun ’til daddy takes your C turbo away! A C program is organized into one or more modules (source files created by a programmer), within which are.
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.
Connecting to Files In order to read or write to a file, we need to make a connection to it. There are several functions for doing this. fopen() – makes.
C Programming Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/LA07/003 Version No. 1.0 Union –mechanism to create user defined data types.
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.
1 Binghamton University Exam 1 Review CS Binghamton University Birds eye view -- Topics Information Representation Bit-level manipulations Integer.
Final Exam Review CS 3358.
CS1010 Programming Methodology
CS1010 Programming Methodology
C Primer.
CS 215 Final Review Ismail abumuhfouz Fall 2014.
A bit of C programming Lecture 3 Uli Raich.
Command Line Arguments
C Language By Sra Sontisirikit
CS 1428 Exam I Review.
CS1010 Discussion Group 11 Week 7 – Two dimensional arrays.
CS 1428 Exam II Review.
CS 1308 Exam 2 Review.
Exam 2 Review CS 3358 Data Structures.
Basic notes on pointers in C
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.
CS 240 – Lecture 18 Command-line Arguments, Typedef, Union, Bit Fields, Pointers to Functions.
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
Indirection.
Pointers The C programming language gives us the ability to directly manipulate the contents of memory addresses via pointers. Unfortunately, this power.
Lecture 2 SCOPE – Local and Global variables
CS 1428 Final Exam Review.
Pointers The C programming language gives us the ability to directly manipulate the contents of memory addresses via pointers. Unfortunately, this power.
EE 312 Final Exam Review.
Chapter 9: Pointers and String
Chapter 9: Pointers and String
Quick Review EECS May 2019.
EE 312 Software Design and Implementation I
15213 C Primer 17 September 2002.
EE 312 Exam I Review.
CS 1428 Exam I Review.
CS 1308 Exam 2 Review.
CS 2308 Final Exam Review.
Extra C Material Based on material in: The C Programming Language, Second Edition by Brian W. Kernighan and Dennis M. Ritchie. Prentice Hall, Inc., 1988. 
EE 312 Exam I Review.
Presentation transcript:

EE 312 Exam I Review

Exam Format 105 Total Points Similar to programming assignments 55 Points Writing Programs 20 Points Short Answer 30 Points of Tracing Code Similar to programming assignments All point values are approximations

Example Programming Problems Given a 2D array of characters, write a short piece of code that will count the number of cells that are directly above the letter ‘Q’ and have the value ‘Y’. Given a file of strings, write a program that will read each line into a linked list node such that the lines are in the correct order (insert at the end) and each insert is a O(1) operation. Then traverse the linked list and print out the lines to the screen.

Example Short Answer Explain why traversing a linked list of nodes is an O(n) operation.

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) printf("Hello!\n“); else if (foo < foo2) printf(“%f\n”, foo2); else printf(“%d\n”, foo); printf(“\n”); printf (“foo2 is %f\n”, foo2);

Fundamentals of C ?? Points Declaration of variables and functions Looping and conditional statements While, for, if One and two dimensional arrays Simple I/O Printf, scanf, fscanf, fgets

Pointers Relationship between arrays and pointers 20 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 “malloc” and “free” commands

Structures 10 Points Declaration Assignment Use of the “.” operator Pointers to structures (*ptr).field ptr->field Structures used in Linked Lists

Linked Lists 30 Points Declaring a linked list Adding a node to a linked list Removing a node from a linked list Traversing a linked list What is the order of magnitude of each of the above operations? Understand the Stack312_ll code and the linked list code from class.

Stacks 20 Points Operations Know how to use in a problem and implement makeStack Push Pop isEmpty isFull Know how to use in a problem and implement Understand the Stack Fun! assignment

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

Command Line arguments 12 Points Make sure you understand how to use argc and argv Understand the use of atoi(char *)

Algorithm Analysis 15 Points Understand what Big O notation is Be able to look at an algorithm or piece of code and determine how much work it has to do (and then the Big(O) analysis of the code) Understand the relative speed of the Big O orders. Which is faster? O(1) or O(n)

How to Study Rewrite all the programs. Don’t memorize C! Code syntax will be on the exam. 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