References Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.

Slides:



Advertisements
Similar presentations
1 Pointers and Strings Section 5.4, , Lecture 12.
Advertisements

EC-111 Algorithms & Computing Lecture #10 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
An introduction to pointers in c
Chapter 9 Pointers and Dynamic Arrays. Overview 9.1 Pointers 9.2 Dynamic Arrays.
CSSE 332 Functions, Pointers in C. 2 Functions - why and how ? If a problem is large If a problem is large Modularization – easier to: Modularization.
More Program Flow Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
Functions Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng.
Arrays Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng.
Section 3 Remote sensing of global change Greenhouse gasses Global Change Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
Chapter 10 More on Modular Programming and Functions.
Pointers Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng.
Introduction Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
Section 3 Remote sensing of global change Air pollution Global Change Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
Digital Data Introduction to Remote Sensing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University.
Expressions and statements Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences.
Functions Dilshad M. Shahid New York
Getting Started Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
Variables and constants Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences.
Computer Science 210 Computer Organization Pointers.
Functions in C. Function Terminology Identifier scope Function declaration, definition, and use Parameters and arguments Parameter order, number, and.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 19 Clicker Questions November 3, 2009.
 2007 Pearson Education, Inc. All rights reserved C Pointers.
Functions Pass by Reference Alina Solovyova-Vincent Department of Computer Science & Engineering University of Nevada, Reno Fall 2005.
CPS120: Introduction to Computer Science Functions.
Image Segmentation and Edge Detection Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng.
CS 376b Introduction to Computer Vision 01 / 23 / 2008 Instructor: Michael Eckmann.
Image transformations Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University.
1 Chapter Four Creating and Using Classes. 2 Objectives Learn about class concepts How to create a class from which objects can be instantiated Learn.
Topics discussed in this section:
University of Malta CSA2090: Lecture 4 © Chris Staff 1 of 20 CSA2090: Systems Programming Introduction to C Dr. Christopher Staff.
C++ Programming Lecture 17 Pointers – Part I The Hashemite University Computer Engineering Department (Adapted from the textbook slides)
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 7 - Pointers Outline 7.1Introduction 7.2Pointer.
Lecture 7 Pointers & Refrence 1. Background 1.1 Variables and Memory  When you declare a variable, the computer associates the variable name with a particular.
Introduction Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated:
CISC105 – General Computer Science Class 8 – 06/28/2006.
Two-Dimensional Filters Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University.
Programming language – C++ Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the concept and use of pointers ❏ To be able to declare, define,
1 2/2/05CS250 Introduction to Computer Science II Pointers.
1 Object-Oriented Programming -- Using C++ Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
Engineering Computing I Chapter 5 Pointers and Arrays.
CSE 332: C++ pointers, arrays, and references Overview of Pointers and References Often need to refer to another object –Without making a copy of the object.
1 CSC103: Introduction to Computer and Programming Lecture No 16.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the relationship between arrays and pointers ❏ To understand the.
Pointers in C by Dr P.Padmanabham Professor (CSE)&Director Bharat Institute of Engineering &Technology Hyderabad Mobile
Chapter 7 Pointers Associate Prof. Yuh-Shyan Chen Dept. of Computer Science and Information Engineering National Chung-Cheng University.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Pointers Call-by-Reference.
C++ Review Data Structures.
Chapter 13 Introduction to C++ Language
Introduction to Programming
Pointers Introduction
Chapter 10: Void Functions
Chapter 7 - Pointers Outline 7.1 Introduction
Chapter 7 - Pointers Outline 7.1 Introduction
Dissection of AVL tree operations
FIGURE 9-5 Integer Constants and Variables
Chapter 9 Pointers Objectives
Dynamic Memory Allocation
Tejalal Choudhary “C Programming from Scratch” Function & its types
Topics discussed in this section:
Chapter 1: Introduction
Pointers Call-by-Reference CSCI 230
Pointers Dr. Bhargavi Goswami Department of Computer Science
C++ Programming Lecture 17 Pointers – Part I
Data Structures and Algorithms Introduction to Pointers
CS250 Introduction to Computer Science II
Dynamic Memory Allocation
Functions Reasons Concepts Passing arguments to a function
Functions By Anand George.
Presentation transcript:

References Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated: 3 November 2004 Chapter 9

Introduction  Reference An alias Ex 9-1 Reference operator &  Convention of naming  Reference must be initialized C++ gives you no way to access the address of the reference itself because it is not meaningful, as it would be if you were using a pointer or other variable  Using the address of operator & on references Ex9-2 Ex9-3  Null pointers and Null references

Passing function arguments by reference  Limitations of functions Passing arguments by values Return only one value  Overcome Using pointers Using references  Ex 9-5: passing by value  Ex 9-6: using pointers  Ex 9-7: using references  Understanding function headers and prototypes  Ex 9-8: returning multiple values by pointers  Ex 9-9: returning multiple values by references  Ex 9-10: Passing by reference for efficiency  Ex 9-11: Passing a const pointer

Important concepts  C++ prefer references to pointers Cleaner and easier to use Better for hiding information  Shortcomings of references Cannot be reassigned Cannot be null  Where to put the reference or indirection operator