Test 2 Review Outline.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Programming Languages and Paradigms The C Programming Language.
Chapter 7: User-Defined Functions II
Chapter 7: User-Defined Functions II Instructor: Mohammad Mojaddam.
Wednesday, 12/11/02, Slide #1 CS 106 Intro to Comp. Sci. 1 Wednesday, 12/11/02  QUESTIONS??  Today: CLOSING CEREMONIES!  HW #5 – Back Monday (12/16)
Wednesday, 10/9/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 10/9/02  QUESTIONS ??  Today:  Discuss HW #02  Discuss test question types  Review 
Chapter 6. 2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single Value Pass by Reference Variable Scope.
 2003 Prentice Hall, Inc. All rights reserved. 1 Arrays –Structures of related data items –Static entity (same size throughout program) A few types –Pointer-based.
1 Chapter 8 Scope, Lifetime, and More on Functions Dale/Weems/Headington.
1 Chapter 9 Scope, Lifetime, and More on Functions.
1 Scope, Lifetime, and More on Functions. 2 Chapter 8 Topics  Local Scope vs. Global Scope of an Identifier  Detailed Scope Rules to Determine which.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
A First Book of C++: From Here To There, Third Edition2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
Chapter 6: User-Defined Functions
C++ Programming: From Problem Analysis to Program Design, Fifth Edition, Fifth Edition Chapter 7: User-Defined Functions II.
Project 1 Due Date: September 25 th Quiz 4 is due September 28 th Quiz 5 is due October2th 1.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Lecture 22: Reviews for Exam 2. Functions Arrays Pointers Strings C Files.
CECS 130 EXAM 1. To declare a constant (read only) value: const int x = 20; const float PI = 3.14; Can we do this? const int x;
Review for Final Exam. Contents 5 questions (20 points each) + 1 bonus question (20 points) – Basic concepts in Chapters 1-4 – Chapters 5-9 – Bonus: Chapter.
Chapter 3 Functions. 2 Overview u 3.2 Using C++ functions  Passing arguments  Header files & libraries u Writing C++ functions  Prototype  Definition.
1 Chapter 9 Scope, Lifetime, and More on Functions.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
Repetition Statements (Loops). 2 Introduction to Loops We all know that much of the work a computer does is repeated many times. When a program repeats.
1 Scope Lifetime Functions (the Sequel) Chapter 8.
1 Chapter 8 Scope, Lifetime, and More on Functions CS185/09 - Introduction to Programming Caldwell College.
L what is a void-function? l what is a boolean function? l is it possible for a function to have no parameters? l what is program stack? function frame?
ARRAYS (Extra slides) Arrays are objects that help us organize large amounts of information.
Information and Computer Sciences University of Hawaii, Manoa
Chapter 7 User-Defined Methods.
Chapter 7: User-Defined Functions II
CS Computer Science IA: Procedural Programming
Lecture 3 C & C++ programming.
C Programming Tutorial – Part I
Programming Languages and Paradigms
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
Programming Paradigms
Chapter 6: Functions Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Instructor: Ioannis A. Vetsikas
User-Defined Functions
CS 1430: Programming in C++.
Arrays, For loop While loop Do while loop
Chapter 9 Scope, Lifetime, and More on Functions
Multiple Files Revisited
User Defined Functions
CS 2308 Exam I Review.
7 Arrays.
An Introduction to Java – Part I, language basics
Arrays We often want to organize objects or primitive data in a way that makes them easy to access and change. An array is simple but powerful way to.
Review for Final Exam.
File Review Declare the File Stream Object Name
References, const and classes
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
Chapter 7: User-Defined Functions II
Review for Final Exam.
COP 3330 Object-oriented Programming in C++
Suggested self-checks: Section 7.11 #1-11
Arrays Arrays A few types Structures of related data items
Fundamental Programming
1-6 Midterm Review.
Submitted By : Veenu Saini Lecturer (IT)
Standard Version of Starting Out with C++, 4th Edition
Programming Languages and Paradigms
Comparing Python and Java
Scope of Identifier The Scope of an identifier (or named constant) means the region of program where it is legal to use that.
SPL – PS2 C++ Memory Handling.
Presentation transcript:

Test 2 Review Outline

Loops while syntax & style SVRL EOF characteristics loop control variable must change value pretest may not be executed when to use

Loops do … while syntax & style characteristics loop control variable must change value postest always executed at least once when to use

Loops for syntax & style three expressions (initialization, continue test, update) increment/decrement operators scope characteristics pretest

Loops Nested loops

Arrays Single Dimensional syntax & style size index range how stored in memory data types referencing single elements of the array initializing syntax & rules Parallel Concerns running off end comparing assigning one array to another outputting content

Arrays What kind of loop to use ‘for’ loop used when know how many elements to store or process usually ‘while’ is used if do not know loop should count the number of stored elements

Arrays Two-dimensional Arrays syntax & style how stored in memory C – Strings what it is (2-D array of char) how used to store strings referencing a single string in an array of C-strings

Functions Syntax & Style function definition where located in source code file header format return type parameter(s) array as a parameter using const local variables scope calling functions void functions functions with return types other than void boolean other function prototypes Passing information to functions Pass by value Pass by reference passing array elements passing arrays

More Functions Scope of a variable or function name Lifetime static local variables global variables where are their declaration(s) located problems associated with scope initialization of local variables with same name global named constants when to use

Functions and 2-D Arrays Specification of 2-D array as parameter in the prototype in the definition calling the function

Stubs & Drivers What they are used for What is a stub characteristics What is a driver