COMPTNG 10A Study Guide - Final Guide: Null Character, Memory Management, Operating System

57 views3 pages
14 Sep 2017
School
Professor

Document Summary

Points to an address that may have a variable: address-of operator & returns this address. Defining a pointer sizeof operator returns the # of bytes it takes to store a variable. Cout << ptr << endl; // prints address at ages[0] Cout << ages << endl; // prints same address. If you use an initializer list and do not define certain/all variables, they will become 0s. Int x[5] = { 1, 2, 3 }; Operating system (os) keeps track of which patch of memory is available for variables, etc. Arrays placed on a contiguous/adjacent patch of memory. Dou(cid:271)le* (cid:272)o(cid:374)st = (cid:862)(cid:272)o(cid:374)st poi(cid:374)ter to a dou(cid:271)le(cid:863) // aka (cid:271)a(cid:272)kwards. Can change the double variable it is pointing to. Cannot change to point to another double i. e. = &anothervar; Double*dp = double* dp = double * dp = double *dp double* dp1, dp2;

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

Related Documents