CISC105 – General Computer Science Class 8 – 06/28/2006.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 1.
Advertisements

Question Bank. Explain the syntax of if else statement? Define Union Define global and local variables with example Concept of recursion with example.
CISC Data Structures Ben Perry University of Delaware Summer 2011.
Sub and Function Procedures
Chapter 9 Pointers and Dynamic Arrays. Overview 9.1 Pointers 9.2 Dynamic Arrays.
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.
© Student Coaching - Registered in England No Identifying Stress.
Defining classes and methods Recitation – 09/(25,26)/2008 CS 180 Department of Computer Science, Purdue University.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
*Don’t forget to sign in!* Sketch/Illustrate 2/3.
CSC Programming for Science Lecture 30: Pointers.
More Program Flow Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
If/else and switch. Assignments Due – Lab 3 No reading – study for your quiz!
General Computer Science for Engineers CISC 106 Final Exam Review Dr. John Cavazos Computer and Information Sciences 05/18/2009.
Review for midterm exam Dilshad M. Shahid Spring NYU.
1 Lab Session-6 CSIT-121 Spring 2005 Structured Choice The do~While Loop Lab Exercises.
Topic R3 – Review for the Final Exam. CISC 105 – Review for the Final Exam Exam Date & Time and Exam Format The final exam is 120-minutes, closed- book,
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
Welcome to CISC220 Data Structures in C++ sakai.udel.edu Office Hours: Mon / Wed 2:30PM - 4PM TAs: Miao Tang,
MULTIPLYING AND DIVIDING FRACTIONS Case 2. MULTIPLICATION  Multiplying fractions is actually very easy!  You begin by placing the two fractions you.
Computer Science Department Relational Operators And Decisions.
More on Input Output Input Stream : A sequence of characters from an input device (like the keyboard) to the computer (the program running). Output Stream.
1 CSC103: Introduction to Computer and Programming Lecture No 11.
Review C Language Features –control flow –C operators –program structure –data types –I/O and files Problem Solving Abilities.
CSC 107 – Programming For Science. Today’s Goal Variables  Variable  Variable name location to store data  Only for humans; 0 x 7E8A2410 harder to.
CSC 107 – Programming For Science. Today’s Goal  When lecture over, start understanding pointers  What a pointer is and what it is not  Why pointers.
CSC 107 – Programming For Science. Today’s Goal  When lecture over, start understanding pointers  What a pointer is and what it is not  Why pointers.
Previously Repetition Structures While, Do-While, For.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 7 Clicker Questions September 22, 2009.
 Classes in c++ Presentation Topic  A collection of objects with same properties and functions is known as class. A class is used to define the characteristics.
Tracing through E01, question 9 – step 1 // p02.cc P. Conrad, for CISC181 07S // Exam question for E01 #include using namespace std; void mysteryFunction(int.
1 Workin’ with Pointas An exercise in destroying your computer.
Week 6: Functions - Part 2 BJ Furman 01OCT2012. The Plan for Today Comments on midterm exam (next week in lab!) Review of functions Scope of identifiers.
Introduction to C Programming Lecture 6. Functions – Call by value – Call by reference Arrays Today's Lecture Includes.
University of Malta CSA2090: Lecture 4 © Chris Staff 1 of 20 CSA2090: Systems Programming Introduction to C Dr. Christopher Staff.
Computer Science By: Erica Ligons Compound Statement A compound statement- block A compound statement- is a unit of code consisting of zero or more statement.
1 CS161 Introduction to Computer Science Topic #8.
 Control Flow statements ◦ Selection statements ◦ Iteration statements ◦ Jump statements.
Working with Loops, Conditional Statements, and Arrays.
Lecture 15: Course Review BJ Furman ME 30 16MAY2011.
1 2/2/05CS250 Introduction to Computer Science II Pointers.
COMP Loop Statements Yi Hong May 21, 2015.
POINTERS IN C. Introduction  A pointer is a variable that holds a memory address  This address is the location of another object (typically another.
Lecture 4 – Function (Part 1) FTMK, UTeM – Sem /2014.
CPS120 Introduction to Computer Science Exam Review Lecture 18.
1 CSC103: Introduction to Computer and Programming Lecture No 17.
Variables, operators, canvas, and multimedia Dr. Reyes.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
C Programming Lecture 8 Call by Reference Scope. Call-by-Reference b For a C function to “effect” (read as “imitate”) call-by- reference: Pointers must.
Programming with ANSI C ++
Unit-1 Introduction to Java
Yanal Alahmad Java Workshop Yanal Alahmad
FIGURE 4-10 Function Return Statements
CS1010 Discussion Group 11 Week 9 – Pointers.
Programming Fundamentals
FIGURE 9-5 Integer Constants and Variables
Tejalal Choudhary “C Programming from Scratch” Pointers
CSC 253 Lecture 8.
CSC 253 Lecture 8.
Selection Control Structure: Switch Case Statement
Cs212: Data Structures Computer Science Department Lecture 2: Arrays.
Computer Science Core Concepts
C Programming Getting started Variables Basic C operators Conditionals
CISC181 Introduction to Computer Science Dr
Strings and Pointer Arrays
CS150 Introduction to Computer Science 1
Exam 2 Exam 2 Regrading Average: 69 TA: Fardad
1-6 Midterm Review.
Millennium High School Agenda Calendar
Lesson 3. Controlling program flow. Loops. Methods. Arrays.
Presentation transcript:

CISC105 – General Computer Science Class 8 – 06/28/2006

Today's Agenda Review switch statements and function calls by reference. Q&A: Lab02 Q&A: Lab03 – What is Question 4 asking? Q&A: Project 1 Return and Review the Exams

Switch Statements Switch statements are for jumping to values. They can take the place of numerous if…else statements Make sure you end your case statements with breaks; Do you really need a default case? Examples –switch.noBreak.cswitch.noBreak.c –switch.withBreak.cswitch.withBreak.c

Passing values by reference Variables declared within a function are local to that function and are not accessible outside of the function. We can create variables known as pointers that will allow us to point to values contained within a variable in another function & is the address of operator Multiple uses of * –Declare a pointer –Multiplication operator –To access the value contained in the memory location pointed to by the pointer variable Menu Example

Q&A: Lab02 Difficulties? Too easy, Too hard? –What –How to make better

Q&A Lab03 Difficulties? Too easy, Too hard? –What –How to make better Question 4 explaination.

Project 1 Difficulties? Questions on the project.

Exam 1 Review