Pointers. CS2023 Winter 2004
|
|
- Julian Douglas
- 5 years ago
- Views:
Transcription
1 Pointers CS2023 Winter 2004
2 Outcomes: Introduction to Pointers C for Java Programmers, Chapter 8, sections Other textbooks on C on reserve After the conclusion of this section you should be able to Describe the two separate areas of memory: heap and stack Declare and initialize pointers of the appropriate type Dereference and copy pointers Describe generic pointers and the NULL macro (we'll use these soon)
3 Addresses Each variable occupies one or more bytes of memory Address of first byte is address of variable 0 1 n 's address is 2000
4 & *+ -, $ $.. 1 / $ 0 $ 32 4 $.. -/ *+ 0 *+ 4 -, $ $ $ $ # $ Memory Management Compilers manage memory in three main parts: 1) Global and static variables ')( % $ "#! - + & & & & & & 5. 6 % $ $ & & &
5 Memory Management Compilers manage memory in three main parts: 1) Global and static variables: never cease to exist! Addresses compiled into code Allocated at compile time limited to fixed-size objects
6 9 F IJ LK D D M M P N D O D RQ S ; D M M LN IJ ; O IJ S LK D D D C D Memory Management Compilers manage memory in three main parts: 2) Automatic variables G)H D >? = ;< : ; < ; < ; < L J ; < ; < ;< F F F F F F ; < T ; < ; < M U D A <? E= = ; D D R ;< Q M T F F F
7 V W W Y Z X X X Memory Management Compilers manage memory in three main parts: 2) Automatic variables: also called stack variables Size known at compile time Stored on a stack (run-time stack) return value return address f main main calls f
8 [ \ \ Memory Management Compilers manage memory in three main parts: 2) Automatic variables: also called stack variables Function that terminates always the last called Never a hole in the stack!
9 ] ^ ^ ^ Memory Management Compilers manage memory in three main parts: 3) Dynamically allocated variables Memory allocated and destroyed at run time, under control of programmer! No guarantee that first variable to be destroyed is last created This area of memory can have holes and is called the heap
10 _ j ` hf e a` i r Memory Management Usually heap and stack begin at opposite ends of the program's memory, and grow towards each other c` gj e e e b m c b q g g` h q a s k ` f e g lnm c c i c g f g bdc o mp a o c ihts q a
11 Memory Management Stack-based memory: implicitly managed by function calls and function returns. Advantage: you do not have to be concerned with deallocation. Disadvantage: may lead to programming errors, e.g. dangling reference problem a variable referencing a memory block whose lifetime has expired
12 Memory Management Heap-based memory: explicitly managed by the programmer. May result in heap fragmentation C programmers are responsible for memory management Improper memory management may lead to memory leakage Memory is a resource, and has to be managed like any other resource (e.g. file handles for open files)
13 u v w Pointers A pointer is a variable whose value is a memory address representing the location of the chunk of memory on either the run-time stack or on the heap. Pointers have names, values and types. Value of p versus value pointed to by p
14 x y ƒ Š y y ~ Pointers 24 ~ z{} y ˆ ˆ ˆ
15 œ Ÿ µ «± ª à  À ¾½ ¹ ÊË Ð Ï Ì ÉÈ Å Ä Þ Ý Ø ÜÛ Õ ÖÕ Ò Ú Ñ Declaring Pointers For any C data type T, you can define a variable of type "pointer to T": ŒŽ pointer to Ž, or Ž pointer šž ž pointer to Ž, or Ž pointer Ž pointer to pointer to ²Ž³ Here: may point to a block of º¼» ºŽÁ bytes may point to a block of Æ¼Ç ÍŽÎ bytes may point to a block of Ó¼Ô Ù Ö bytes
16 ß ã â äå ã â äå ã â äå Declaring Pointers The placement of the whitespace around the asterisk in a pointer declaration is a convention àžá àžá àžá We will use the third convention
17 æ é ì î í ó ñ îô ö î õ ï ù ÿ û ú þ Address Operator Declaring a pointer variable sets aside space for a pointer but doesn't make it point to an object êë çžè Need to initialize? ï ò ïžð ï ô is an Žø is like an variable üžý (but you must not assign to it) pointer, pointing to the variable
18 Dereferencing: Indirection Operator? 1
19 / +" ) %& $ # ) %& $ #. - Dereferencing: Indirection Operator 2 0 " #! ' * '( $, " #! " #! + ' * '( $, " #! without actually using Can change variable use this to implement function call by reference
20 1 4 7 K J? = ;< 5 9: 4 IF A GF A@ L Q T V T U X W Dereferencing: Indirection Operator Never dereference an unitialized pointer! H G DE B C ; > 2 3 Assigning a value to M N much worse! R S O P R S Where does point to? It might point to memory belonging to the program, causing it to behave erratically, or to memory belonging to another process, causing a segmentation fault.
21 a Y Y b \ ] ] ] _ oy l Y jk \ d g _ Y Y oa Y Y Y l a Y jk \ d d g ] ] ] _ Zi qi ~ ˆ Adresses and Values of variables ahg f ced ^`_ a f Y f f d n Z m d ] f d m d ] a f m d ] Y f l n Z p m p m p m ced ced m d ] l d t g w ƒ } } z[{ z y w u x u uwv 1 2 Y[Z Y[Z i Y[Z i \sr
22 Ž Š Œ š? Pointer Assignment Can copy pointers of the same type Š Š 1
23 Ÿ ž Pointer Assignment 2 œ
24 «² ± ³ µ?? Pointer Assignment Don't confuse q=p with *q=*p ª ª «1 ª «ª 1
25 ½» ¼ ÅÆ ºÄ àÀ ¼ ½ ¹ ¹ Î Í Ì É Ë¹ Ç ÅÆ» º ¼ Using pointers: example 1 ¹ÁÀ ¾ ¹ ¼ ˽ Ê ¹ ¼ Ê Ç É ÉÈ ÇÈ ½ À Ê ¹ÁÏ Ê ÇÈ ¾ À ¹ º ¹ º Ð
26 Ñ Ó Ô Ñ Ó Ù Õ Ó Ù Þß Ñ ãõ ÒÝ ÜÛ Ø Ø Ö Ô Ô ãõ Ñ Õ Ñ à â æ Þß Ó å Ø Ò Ö ç Ô Using pointers: example 2 ÕÁÖ Ñ Ò Ñ Ö Ú Ø Ñ Ò Õ Ö Ú Ø Ñ Ò à â âá àá àá Ø Ø Ø Ø Ñ Ò ä Don't need the & operator in scanf, because pi and pj are already pointers
27 ê ê òó øî éñ ðï ì ì í Using pointers: example 3 Why bother using i and j? èáí ë ì è é î í ë ì è é è ô ö öõ ôõ What will go wrong?
28 ý û þ ý üû úù const pointers and pointers to const value of pointer to a constant integer, the may change, but the value of can not ÿ of constant pointer to integer; the value can change, but the value of can not integer. constant pointer to constant
29 " # $% & Generic Pointers A reference to "any" kind of object use a variable of type! defines a generic, or typeless pointer. Often cast to ' ( Generic pointers cannot be deferenced. Must cast.
30 ,+ * ) / / 6 23 Generic Pointers Data stored in a memory object can be recovered as a value of a specific data type. For example, for a generic pointer -. which points to an object containing a double value, you can retrieve this value using the following syntax: 7 8
31 <;? C? D F = >@ C D G H R KL a ` ^ ^ XY Generic Pointers = > : 9 Ä Can assign to p: GJ I but not dereference it: UWV K ST P Q MON Have to use cast: awb X \ ] _ [ _` \ ] ZO[
32 c d e on m l g f NULL macro Special "zero" value that is useful to initialize pointers, and then to compare pointer's value: if(p == NULL)... NULL defined in six headers, including hji k and p
Lecture 5 C Programming Language
Lecture 5 C Programming Language Summary of Lecture 5 Pointers Pointers and Arrays Function arguments Dynamic memory allocation Pointers to functions 2D arrays Addresses and Pointers Every object in the
More informationPointers & Arrays. CS2023 Winter 2004
Pointers & Arrays CS2023 Winter 2004 Outcomes: Pointers & Arrays C for Java Programmers, Chapter 8, section 8.12, and Chapter 10, section 10.2 Other textbooks on C on reserve After the conclusion of this
More informationModules. CS2023 Winter 2004
Modules CS2023 Winter 2004 Outcomes: Modules C for Java Programmers, Chapter 7, sections 7.4.1-7.4.6 Code Complete, Chapter 6 After the conclusion of this section you should be able to Understand why modules
More informationCartons (PCCs) Management
Final Report Project code: 2015 EE04 Post-Consumer Tetra Pak Cartons (PCCs) Management Prepared for Tetra Pak India Pvt. Ltd. Post Consumer Tetra Pak Cartons (PCCs) Management! " # $ " $ % & ' ( ) * +,
More informationThis file contains an excerpt from the character code tables and list of character names for The Unicode Standard, Version 3.0.
Range: This file contains an excerpt from the character code tables and list of character names for The Unicode Standard, Version.. isclaimer The shapes of the reference glyphs used in these code charts
More informationCassandra: Distributed Access Control Policies with Tunable Expressiveness
Cassandra: Distributed Access Control Policies with Tunable Expressiveness p. 1/12 Cassandra: Distributed Access Control Policies with Tunable Expressiveness Moritz Y. Becker and Peter Sewell Computer
More informationPersonal Conference Manager (PCM)
Chapter 3-Basic Operation Personal Conference Manager (PCM) Guidelines The Personal Conference Manager (PCM) interface enables the conference chairperson to control various conference features using his/her
More informationAPPLESHARE PC UPDATE INTERNATIONAL SUPPORT IN APPLESHARE PC
APPLESHARE PC UPDATE INTERNATIONAL SUPPORT IN APPLESHARE PC This update to the AppleShare PC User's Guide discusses AppleShare PC support for the use of international character sets, paper sizes, and date
More information1. Oracle Mobile Agents? 2. client-agent-server client-server
1. Oracle Mobile Agents?!"#$ application software system%. &'( )'*+, -. */0 1 23 45 678 9:; >?, %@ +%. - 6A(mobility) : B? CDE@ F GH8!" * channel #I 1 = / 4%. ()'*, &', LAN) - * application
More informationCMPT 470 Based on lecture notes by Woshun Luk
* ) ( & 2XWOLQH &RPSRQHQ 2EMHF 0RGXOHV CMPT 470 ased on lecture notes by Woshun Luk What is a DLL? What is a COM object? Linking two COM objects Client-Server relationships between two COM objects COM
More informationIn Java we have the keyword null, which is the value of an uninitialized reference type
+ More on Pointers + Null pointers In Java we have the keyword null, which is the value of an uninitialized reference type In C we sometimes use NULL, but its just a macro for the integer 0 Pointers are
More informationState of Connecticut Workers Compensation Commission
State of Connecticut Workers Compensation Commission Notice to Employees Workers Compensation Act Chapter 568 of the Connecticut General Statutes (the Workers Compensation Act) requires your employer,
More informationConMan. A Web based Conference Manager for Asterisk. How I Managed to get Con'd into skipping my summer vacation by building this thing
ConMan A Web based Conference Manager for Asterisk -or- How I Managed to get Con'd into skipping my summer vacation by building this thing $90503&07 $:3.74889028,-47,94708 $90503&078:3.42 Sun Labs, slide
More informationO Type of array element
! " #! $ % % # & : ; a ontiguous sequene of variables. all of the sae type. Eah variable is identified by its index. Index values are integers. Index of first entry is. ' ( ) * + May /,. - ( & ( ( J K
More informationTo provide state and district level PARCC assessment data for the administration of Grades 3-8 Math and English Language Arts.
200 West Baltimore Street Baltimore, MD 21201 410-767-0100 410-333-6442 TTY/TDD msde.maryland.gov TO: FROM: Members of the Maryland State Board of Education Jack R. Smith, Ph.D. DATE: December 8, 2015
More informationASCII Code - The extended ASCII table
ASCII Code - The extended ASCII table ASCII, stands for American Standard Code for Information Interchange. It's a 7-bit character code where every single bit represents a unique character. On this webpage
More informationAdorn. Serif. Smooth. v22622x
s u Adorn f Serif Smooth 9 0 t v22622x user s guide PART OF THE ADORN POMANDER SMOOTH COLLECTION v O P E N T Y P E FAQ : For information on how to access the swashes and alternates, visit LauraWorthingtonType.com/faqs
More informationSheila. Regular Bold. User s Guide
Sheila Regular Bold User s Guide font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/. Your
More informationERNST. Environment for Redaction of News Sub-Titles
ERNST Environment for Redaction of News Sub-Titles Introduction ERNST (Environment for Redaction of News Sub-Titles) is a software intended for preparation, airing and sequencing subtitles for news or
More informationHoneyBee User s Guide
HoneyBee User s Guide font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/. Your font is
More informationBUCKLEY. User s Guide
BUCKLEY User s Guide O P E N T Y P E FAQ : For information on how to access the swashes and alternates, visit LauraWorthingtonType.com/faqs All operating systems come equipped with a utility that make
More informationAdorn. Slab Serif Smooth R E G U LAR. v22622x
s u Adorn f Slab Serif Smooth R E G U LAR B OL D t 0 v22622x 9 user s guide PART OF THE ADORN POMANDER SMOOTH COLLECTION v O P E N T Y P E FAQ : For information on how to access the swashes and alternates,
More informationOracle Primavera P6 Enterprise Project Portfolio Management Performance and Sizing Guide. An Oracle White Paper December 2011
Oracle Primavera P6 Enterprise Project Portfolio Management Performance and Sizing Guide An Oracle White Paper December 2011 Disclaimer The following is intended to outline our general product direction.
More informationAppendix C. Numeric and Character Entity Reference
Appendix C Numeric and Character Entity Reference 2 How to Do Everything with HTML & XHTML As you design Web pages, there may be occasions when you want to insert characters that are not available on your
More informationIII. CLAIMS ADMINISTRATION
III. CLAIMS ADMINISTRATION Insurance Providers: Liability Insurance: Greenwich Insurance Company American Specialty Claims Representative: Mark Thompson 142 N. Main Street, Roanoke, IN 46783 Phone: 260-672-8800
More information[0569] p 0318 garbage
A Pointer is a variable which contains the address of another variable. Declaration syntax: Pointer_type *pointer_name; This declaration will create a pointer of the pointer_name which will point to the
More informationOOstaExcel.ir. J. Abbasi Syooki. HTML Number. Device Control 1 (oft. XON) Device Control 3 (oft. Negative Acknowledgement
OOstaExcel.ir J. Abbasi Syooki HTML Name HTML Number دهدهی ا کتال هگزاد سیمال باینری نشانه )کاراکتر( توضیح Null char Start of Heading Start of Text End of Text End of Transmission Enquiry Acknowledgment
More informationUNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS CSIS1614
UNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS CSIS1614 DATE: 7 May 2015 MARKS: 130 ASSESSOR: Prof. P.J. Blignaut (Bonus marks: 5) MODERATOR: Dr. L. de Wet TIME: 180 minutes
More information) $ G}] }O H~U. G yhpgxl. Cong
» Þ åî ïî á ë ïý þý ÿ þ ë ú ú F \ Œ Œ Ÿ Ÿ F D D D\ \ F F D F F F D D F D D D F D D D D FD D D D F D D FD F F F F F F F D D F D F F F D D D D F Ÿ Ÿ F D D Œ Ÿ D Ÿ Ÿ FŸ D c ³ ² í ë óô ò ð ¹ í ê ë Œ â ä ã
More information1 Swing 2006A 5 B? 18. Swing Sun Microsystems AWT. 3.1 JFrame JFrame GHI
' þ ³ š ³ œ ³ 2006 1 Swing! " # &%' ()+-,./0 1 2 45-6 &8% 9 : ; < = >@? 2006A 5 B? 18 C@D E F : G HJILK-M!NPO-Q R S-I!T R!U V-W X Y!Z[N GUI\ ] ^ O-Q R S _a` b-w!c dje!f g Swing Wh i Z j k l m n N VisualEditor
More informationPointers II. Class 31
Pointers II Class 31 Compile Time all of the variables we have seen so far have been declared at compile time they are written into the program code you can see by looking at the program how many variables
More informationVersion /10/2015. Type specimen. Bw STRETCH
Version 1.00 08/10/2015 Bw STRETCH type specimen 2 Description Bw Stretch is a compressed grotesque designed by Alberto Romanos, suited for display but also body text purposes. It started in 2013 as a
More informationAdorn. Serif. Smooth. v22622x. user s guide PART OF THE ADORN POMANDER SMOOTH COLLECTION
s u Adorn f Serif Smooth 9 0 t v22622x user s guide PART OF THE ADORN POMANDER SMOOTH COLLECTION v font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on
More informationUSB-ASC232. ASCII RS-232 Controlled USB Keyboard and Mouse Cable. User Manual
USB-ASC232 ASCII RS-232 Controlled USB Keyboard and Mouse Cable User Manual Thank you for purchasing the model USB-ASC232 Cable HAGSTROM ELECTRONICS, INC. is pleased that you have selected this product
More informationRun-time Environments - 3
Run-time Environments - 3 Y.N. Srikant Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of the Lecture n What is run-time
More informationBanner 8 Using International Characters
College of William and Mary Banner 8 Using International Characters A Reference and Training Guide Banner Support January 23, 2009 Table of Contents Windows XP Keyboard Setup 3 VISTA Keyboard Setup 7 Creating
More informationBold U S E R S G U I D E
Yana Regular Bold Italic USER S GUIDE S S S font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/.
More informationKbdKaz 500 layout tables
a ao a ao a o o o o o a a oo A o a a o a a oa ao oo A o a a o oa ao A a o a oa oa ao o a a a a o a A a a A ˆ a a A ˇ ao a a A a a A o Ao a a A Ao a o a a A ao a o a a A α a A a a a A o o a a A A a a A
More informationGoals of this Lecture
C Pointers Goals of this Lecture Help you learn about: Pointers and application Pointer variables Operators & relation to arrays 2 Pointer Variables The first step in understanding pointers is visualizing
More informationContrast. user s guide
N Contrast chu U77777777V user s guide c P font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/.
More informationPointers, Dynamic Data, and Reference Types
Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation The new operator The delete operator Dynamic Memory Allocation for Arrays 1 C++ Data Types simple
More informationCSE 307: Principles of Programming Languages
CSE 307: Principles of Programming Languages Variables and Constants R. Sekar 1 / 22 Topics 2 / 22 Variables and Constants Variables are stored in memory, whereas constants need not be. Value of variables
More informationHeap, Variables, References, and Garbage. CS152. Chris Pollett. Oct. 13, 2008.
Heap, Variables, References, and Garbage. CS152. Chris Pollett. Oct. 13, 2008. Outline. Dynamic Allocation. Variables and Constants. Aliases and Problems. Garbage. Introduction. On Wednesday, we were talking
More informationGetting round your Mac with Shortcut Keys
The Mac has many useful keyboard shortcuts but these do depend on you knowing the difference between the following keys: Shift Fn Ctrl Alt (Also referred to as Option) Command (Also referred to as the
More informationCurvature of subdivision surfaces
Curvature of subdivision surfaces a differential geometric analysis and literature review Jörg Peters, jorg@cise.ufl.edu Georg Umlauf, georg.umlauf@gmx.de Motivation Almost all subdivision algorithms in
More informationAdorn. Serif. v x. user s gu ide
Adorn f Serif t 9a0 v2226222x user s gu ide v fon t faq HOW T O I N S TA L L YOU R F ON T H O W T O I N S E R T S WA S H E S, You will receive your files as a zipped folder. For instructions on how to
More informationFor information on how to access the swashes and alternates, visit LauraWorthingtonType.com/faqs
Juicy User s Guide opent ype faq: For information on how to access the swashes and alternates, visit LauraWorthingtonType.com/faqs All operating systems come equipped with a utility that make it possible
More informationUNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS CSIS1614. DATE: 5 March 2015 MARKS: 100 SECTION A (36)
UNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS CSIS1614 DATE: 5 March 2015 MARKS: 100 ASSESSOR: Prof. P.J. Blignaut TIME: 180 minutes MODERATOR: Dr. L. de Wet SECTION A (36)
More informationVariation of Pointers
Variation of Pointers A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before
More informationCommunication and processing of text in the Kildin Sámi, Komi, and Nenets, and Russian languages.
TYPE: 96 Character Graphic Character Set REGISTRATION NUMBER: 200 DATE OF REGISTRATION: 1998-05-01 ESCAPE SEQUENCE G0: -- G1: ESC 02/13 06/00 G2: ESC 02/14 06/00 G3: ESC 02/15 06/00 C0: -- C1: -- NAME:
More informationfont faq HOW TO INSTALL YOUR FONT HOW TO INSERT SWASHES, ALTERNATES, AND ORNAMENTS
font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/. Your font is available in two formats:
More informationfont faq HOW TO INSTALL YOUR FONT HOW TO INSERT SWASHES, ALTERNATES, AND ORNAMENTS
font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/. Your font is available in two formats:
More informationfont faq HOW TO INSTALL YOUR FONT HOW TO INSERT SWASHES, ALTERNATES, AND ORNAMENTS
font faq HOW TO INSTALL YOUR FONT You will receive your files as a zipped folder. For instructions on how to unzip your folder, visit LauraWorthingtonType.com/faqs/. Your font is available in two formats:
More information124 DISTO pro 4 / pro 4 a-1.0.0zh
0 30 40 50 DISTO PD-Z01 14 DISTO pro 4 / pro 4 a-1.0.0 DISTO pro 4 / pro 4 a-1.0.0 15 16 DISTO pro 4 / pro 4 a-1.0.0 DISTO pro 4 / pro 4 a-1.0.0 17 1 PD-Z03 3 7 4 5 6 10 9 8 18 DISTO pro 4 / pro 4 a-1.0.0
More informationLecture 14. No in-class files today. Homework 7 (due on Wednesday) and Project 3 (due in 10 days) posted. Questions?
Lecture 14 No in-class files today. Homework 7 (due on Wednesday) and Project 3 (due in 10 days) posted. Questions? Friday, February 11 CS 215 Fundamentals of Programming II - Lecture 14 1 Outline Static
More informationINITIALISING POINTER VARIABLES; DYNAMIC VARIABLES; OPERATIONS ON POINTERS
INITIALISING POINTER VARIABLES; DYNAMIC VARIABLES; OPERATIONS ON POINTERS Pages 792 to 800 Anna Rakitianskaia, University of Pretoria INITIALISING POINTER VARIABLES Pointer variables are declared by putting
More informationRapid Prototyping of flexible Embedded Systems on multi-dsp Architectures
Rapid Prototyping of flexible Embedded Systems on multi-dsp Architectures Bernhard Rinner, Martin Schmid and Reinhold Weiss Institut für Technische Informatik Technische Universität Graz Inffeldgasse 16/1,
More informationMAT 22B-001: Differential Equations
MAT 22B-001: Differential Equations Final Exam Solutions Note: There is a table of the Laplace transform in the last page Name: SSN: Total Score: Problem 1 (5 pts) Solve the following initial value problem
More informationCSCI 171 Chapter Outlines
Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures
More informationClaimSpotter: an Environment to Support Sensemaking with Knowledge Triples
ClaimSpotter: an Environment to Support Sensemaking with Knowledge Triples Bertrand Sereno, Simon Buckingham Shum & Enrico Motta Knowledge Media Institute The Open University Milton Keynes MK7 6AA, UK
More informationProbabilistic analysis of algorithms: What s it good for?
Probabilistic analysis of algorithms: What s it good for? Conrado Martínez Univ. Politècnica de Catalunya, Spain February 2008 The goal Given some algorithm taking inputs from some set Á, we would like
More informationEstimate Traffic with Combined Neural Network Approach
Estimate Traffic with Combined Neural Network Approach Edmond Chin-Ping Chang, Ph.D., P.E Oak Ridge National Laboratory, Oak Ridge, TN 37831-6207 USA E-mail: ecc2005@ornl.gov Abstract - Many operating
More informationAdorn. Slab Serif BOLD. v x. user s gu ide
Adorn f Slab Serif BOLD t 9a0 v2226222x user s gu ide v fon t faq HOW T O I N S TA L L YOU R F ON T H O W T O I N S E R T S WA S H E S, You will receive your files as a zipped folder. For instructions
More informationADORN. Roman. v x. user s gu ide
ADORN f Roman t 9a0 v2226222x user s gu ide v fon t faq HOW T O I N S TA L L YOU R F ON T H O W T O I N S E R T S WA S H E S, You will receive your files as a zipped folder. For instructions on how to
More informationCommunication and processing of text in the Chuvash, Erzya Mordvin, Komi, Hill Mari, Meadow Mari, Moksha Mordvin, Russian, and Udmurt languages.
TYPE: 96 Character Graphic Character Set REGISTRATION NUMBER: 201 DATE OF REGISTRATION: 1998-05-01 ESCAPE SEQUENCE G0: -- G1: ESC 02/13 06/01 G2: ESC 02/14 06/01 G3: ESC 02/15 06/01 C0: -- C1: -- NAME:
More informationDeclaring Pointers. Declaration of pointers <type> *variable <type> *variable = initial-value Examples:
1 Programming in C Pointer Variable A variable that stores a memory address Allows C programs to simulate call-by-reference Allows a programmer to create and manipulate dynamic data structures Must be
More informationCA31-1K DIS. Pointers. TA: You Lu
CA31-1K DIS Pointers TA: You Lu Pointers Recall that while we think of variables by their names like: int numbers; Computer likes to think of variables by their memory address: 0012FED4 A pointer is a
More informationSecond Year March 2017
Reg. No. :... Code No. 5052 Name :... Second Year March 2017 Time : 2 Hours Cool-off time : 15 Minutes Part III COMPUTER APPLICATION (Commerce) Maximum : 60 Scores General Instructions to Candidates :
More informationr v i e w o f s o m e r e c e n t d e v e l o p m
O A D O 4 7 8 O - O O A D OA 4 7 8 / D O O 3 A 4 7 8 / S P O 3 A A S P - * A S P - S - P - A S P - - - - L S UM 5 8 - - 4 3 8 -F 69 - V - F U 98F L 69V S U L S UM58 P L- SA L 43 ˆ UéL;S;UéL;SAL; - - -
More informationA Mixed Fragmentation Algorithm for Distributed Object Oriented Databases 1
A Mixed Fragmentation Algorithm for Distributed Object Oriented Databases 1 Fernanda Baião Department of Computer Science - COPPE/UFRJ Abstract Federal University of Rio de Janeiro - Brazil baiao@cos.ufrj.br
More information7DONSODQ. ƒ We called our platform 9 D-II TG: Distributed Internet Traffic Generator
',7*'LVWULEXWHG,QWHUQHW7UDIILF *HQHUDWRU Antonio Pescapè,, Donato Emma, Stefano Avallone,, Alessio Botta, and Giorgio Ventre { pescape@unina.it @unina.it} Dipartimento Informatica e Sistemistica Università
More informationCS 330 Lecture 18. Symbol table. C scope rules. Declarations. Chapter 5 Louden Outline
CS 0 Lecture 8 Chapter 5 Louden Outline The symbol table Static scoping vs dynamic scoping Symbol table Dictionary associates names to attributes In general: hash tables, tree and lists (assignment ) can
More informationDistrict Institute of Education and Training Lawspet, Puducherry.
District Institute of Education and Training Lawspet, Puducherry. Educational Computing Record work done by with the Register Number. Submitted for the Internal Assessment examination, April / May 2011,
More informationCPSC 427a: Object-Oriented Programming
CPSC 427a: Object-Oriented Programming Michael J. Fischer Lecture 5 September 15, 2011 CPSC 427a, Lecture 5 1/35 Functions and Methods Parameters Choosing Parameter Types The Implicit Argument Simple Variables
More informationThe course that gives CMU its Zip! Web Services Nov 26, Topics HTTP Serving static content Serving dynamic content
15-213 The course that gives CMU its Zip! Web Services Nov 26, 2002 Topics HTTP Serving static content Serving dynamic content Web History 1945: 1989: 1990: Vannevar Bush, As we may think, Atlantic Monthly,
More informationAutomatic Verification of Finite State Concurrent Systems
Automatic Verification of Finite State Concurrent Systems Edmund M Clarke, Jr Computer Science Department Carnegie Mellon University Pittsburgh, PA 523 Temporal Logic Model Checking Specification Language:
More information7. IP. » &!'() (IS: intermediate system) !"#$% *+'() (ES: end system) Copyright 2000, Suguru Yamaguchi, All right reserved
7. IP»!"#$%» &!'() (IS: intermediate system) *+'() (ES: end system) 1 ISES ES: End System!"#$Ethernet%&' ()*+,'-./ Ethernet IS: Intermediate System =>?@&+12/AB$CD EF FDDI ES: End System 0 FDDI%&'12!"#$345
More informationUser Guide for Greek GGT-Fonts Revision date: 23 May, 2011
User Guide for Greek GGT-Fonts Revision date: 23 May, 2011 by Graham G Thomason Copyright Graham G Thomason, 2009. Permission is granted to copy or publish this document, provided this complete notice
More informationPointers. Addresses in Memory. Exam 1 on July 18, :00-11:40am
Exam 1 on July 18, 2005 10:00-11:40am Pointers Addresses in Memory When a variable is declared, enough memory to hold a value of that type is allocated for it at an unused memory location. This is the
More informationESCAPE SEQUENCE G0: ESC 02/08 04/13 C0: C1: NAME Extended African Latin alphabet coded character set for bibliographic information interchange
TYPE: 9-character graphic character set REGISTRATION NUMBER: 9 DATE OF REGISTRATION: ESCAPE SEQUENCE G: ESC /8 / G: ESC /9 / G: ESC / / G: ESC / / C: C: NAME Extended African Latin alphabet coded character
More informationIPv6 Servic es. LONG Net w ork
IP Servic es in LONG Net w ork Carlos Ralli Ucendo Telefonica Research & Development Overview IP Distributed Labs LONG: Building a distributed IP Lab. LONG Backbone LONG Global View LONG IP Services Examples
More informationPointers. Memory. void foo() { }//return
Pointers Pointers Every location in memory has a unique number assigned to it called it s address A pointer is a variable that holds a memory address A pointer can be used to store an object or variable
More informationModels, Notation, Goals
Scope Ë ÕÙ Ò Ð Ò ÐÝ Ó ÝÒ Ñ ÑÓ Ð Ü Ô Ö Ñ Ö ² Ñ ¹Ú ÖÝ Ò Ú Ö Ð Ö ÒÙÑ Ö Ð ÔÓ Ö ÓÖ ÔÔÖÓÜ Ñ ÓÒ ß À ÓÖ Ð Ô Ö Ô Ú ß Ë ÑÙÐ ÓÒ Ñ Ó ß ËÑÓÓ Ò ² Ö Ò Ö Ò Ô Ö Ñ Ö ÑÔÐ ß Ã ÖÒ Ð Ñ Ó ÚÓÐÙ ÓÒ Ñ Ó ÓÑ Ò Ô Ö Ð Ð Ö Ò Ð ÓÖ Ñ
More informationEvaluation of Ethernet based Control Network used in the Distributed Control System
Proceedings on the 15th CISL Winter Workshop Kushu, Japan February 2002 Evaluation of Ethernet based Control Network used in the Distributed Control System Jae Young Choi Control Information Systems Lab.,
More informationChapter 2. Procedural Programming
Chapter 2 Procedural Programming 2: Preview Basic concepts that are similar in both Java and C++, including: standard data types control structures I/O functions Dynamic memory management, and some basic
More informationAgenda. Components of a Computer. Computer Memory Type Name Addr Value. Pointer Type. Pointers. CS 61C: Great Ideas in Computer Architecture
CS 61C: Great Ideas in Computer Architecture Krste Asanović & Randy Katz http://inst.eecs.berkeley.edu/~cs61c And in Conclusion, 2 Processor Control Datapath Components of a Computer PC Registers Arithmetic
More informationCS 61C: Great Ideas in Computer Architecture. Lecture 3: Pointers. Krste Asanović & Randy Katz
CS 61C: Great Ideas in Computer Architecture Lecture 3: Pointers Krste Asanović & Randy Katz http://inst.eecs.berkeley.edu/~cs61c Agenda Pointers in C Arrays in C This is not on the test Pointer arithmetic
More informationA Survey of Current CLOS MOP Implementations
A Survey of Current CLOS MOP Implementations Raymond de Lacaze Artificial Intelligence Center SRI International 333 Ravenswood Ave. Menlo Park, CA 9402 delacaze@ai.sri.com Tim Bradshaw Cley Limited 6 East
More informationMyriad Pro Light. Lining proportional. Latin capitals. Alphabetic. Oldstyle tabular. Oldstyle proportional. Superscript ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹,.
Myriad Pro Light Latin capitals A B C D E F G H I J K L M N O P Q R S T U V W X Y Z & Æ Ł Ø Œ Þ Ð Á Â Ä À Å Ã Ç É Ê Ë È Í Î Ï Ì İ Ñ Ó Ô Ö Ò Õ Š Ú Û Ü Ù Ý Ÿ Ž Ă Ā Ą Ć Č Ď Đ Ě Ė Ē Ę Ğ Ģ Ī Į Ķ Ĺ Ľ Ļ Ń Ň Ņ
More informationPointers and References
Steven Zeil October 2, 2013 Contents 1 References 2 2 Pointers 8 21 Working with Pointers 8 211 Memory and C++ Programs 11 212 Allocating Data 15 22 Pointers Can Be Dangerous 17 3 The Secret World of Pointers
More informationConfiguring the SFS Environment Manually [4]
Configuring the SFS Enironment Manually [4]!#" %$&'%() * +,-". *'# */,0" / 1 32 4 1 '5 *,76 1 2 198;: " < =/ 4@ A5B/C"!- CDFEFGH$&I 1 @ *44 / J@< SFS!5" K,< "L *'# */,LMNG 4> *'#,-,- " 44 '? : '#"!#" O
More informationPointers and Dynamic Memory Allocation
Pointers and Dynamic Memory Allocation ALGORITHMS & DATA STRUCTURES 9 TH SEPTEMBER 2014 Last week Introduction This is not a course about programming: It s is about puzzling. well.. Donald Knuth Science
More informationSo far, system calls have had easy syntax. Integer, character string, and structure arguments.
Pointers Page 1 So far, system calls have had easy syntax Wednesday, September 30, 2015 10:45 AM Integer, character string, and structure arguments. But this is not always true. Today, we begin to explore
More informationPrimitive Types and Some Simple IO in Java
1. Overview Primitive Types and Some Simple IO in Java The learning objectives of this laboratory session are: How to build and run a java standalone program without an IDE The elements of good programming
More informationCS162 - POINTERS. Lecture: Pointers and Dynamic Memory
CS162 - POINTERS Lecture: Pointers and Dynamic Memory What are pointers Why dynamically allocate memory How to dynamically allocate memory What about deallocation? Walk thru pointer exercises 1 CS162 -
More informationChap. 3. Chap. 3. Recall and Precision Alternative Measures. TREC Collection CACM and ISI Collections CFC (Cystic Fibrosis Collection)
b!"$#%&'(!) *,+.-0/1-0/2 3547698;:'=?@A8;BC
More informationPointers. Pointer Variables. Chapter 11. Pointer Variables. Pointer Variables. Pointer Variables. Declaring Pointer Variables
Chapter 11 Pointers The first step in understanding pointers is visualizing what they represent at the machine level. In most modern computers, main memory is divided into bytes, with each byte capable
More informationEditors: prof. Ing. Iveta Ubrežiová, CSc., Ing. Drahoslav Lančarič, PhD., Ing. Ingrida Košičiarová, PhD. ISBN
Proceedings from international scientific conference Corporate Social Responsibility and Human Resource Management in V4 Countries. Organised by the Department of Management, Faculty of Economy and Management,
More informationCS107 Handout 08 Spring 2007 April 9, 2007 The Ins and Outs of C Arrays
CS107 Handout 08 Spring 2007 April 9, 2007 The Ins and Outs of C Arrays C Arrays This handout was written by Nick Parlante and Julie Zelenski. As you recall, a C array is formed by laying out all the elements
More informationPIC 10A Pointers, Arrays, and Dynamic Memory Allocation. Ernest Ryu UCLA Mathematics
PIC 10A Pointers, Arrays, and Dynamic Memory Allocation Ernest Ryu UCLA Mathematics Pointers A variable is stored somewhere in memory. The address-of operator & returns the memory address of the variable.
More information