COM SCI 31 Chapter Notes - Chapter 10: Null Character, Memory Address

43 views4 pages
25 Mar 2017
School
Professor

Document Summary

Pro(cid:448)ides (cid:373)ore (cid:272)o(cid:374)trol of the (cid:272)o(cid:373)puter(cid:859)s (cid:373)e(cid:373)ory: a (cid:272)o(cid:373)puter(cid:859)s (cid:373)e(cid:373)ory di(cid:448)ided i(cid:374)to (cid:374)u(cid:373)(cid:271)ered (cid:373)e(cid:373)ory lo(cid:272)atio(cid:374) (cid:894)(cid:271)ytes(cid:895) The address is (cid:272)alled a poi(cid:374)ter (cid:271)e(cid:272)ause the address (cid:272)a(cid:374) (cid:271)e thought of as (cid:862)poi(cid:374)ti(cid:374)g(cid:863) to the variable: poi(cid:374)ts (cid:271)y telli(cid:374)g (cid:449)here the (cid:448)aria(cid:271)le is, rather tha(cid:374) gi(cid:448)i(cid:374)g the (cid:448)aria(cid:271)le(cid:859)s (cid:374)a(cid:373)e. Arrays whose size is determined while the program is running, rather than being fixes when the program is written. Pointers can be stored in a variable (i. e. double *p: this (cid:448)aria(cid:271)le(cid:859)s data type = the data types this (cid:448)aria(cid:271)le is allo(cid:449)ed to poi(cid:374)t to can declare with other ordinary variables of same type. Must be declared with an asterisk in front of the variable name. Pointer = address = integer: but a pointer is not an integer, cannot perform arithmetic operations. ^ this creates 2 ways to refer to variablename1: calling variablename1 directly, calling the variable that pointer 1 is pointing to (which is variablename1)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents