CS 1337 Lecture 2: 2018-01-24 Search and Sort Pt2

17 views2 pages

Document Summary

I can get that address use the "address of" operator, which is the & //int *ptr2 = nullptr; //zero, used for all pointer values int main() //int num = -99; //num is an identifier (variable name) * num is used by the compiler to identify a location. * we can obtain that location in memory, specifically the address. * each variable is stored at a unique address in memory. * we can create a variable that stores an address. * pointer variables (pointer) is a variable that. * because the pointer holds the address of another. * variable or data, it "points" to that data. * what does it point to? what type of data identifier. * * means this is a pointer variable cout << num << endl; cout << &num << endl; cout << &num2 << endl; int *ptr; //make sure to put asterisk before every pointer variable name.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents