CSE 278 Lecture Notes - Lecture 18: Dereference Operator, Willis Tower, Data Type
Document Summary
Cse 278 - lecture - execution and assembly programming. For a good understanding of assembly and machine language, the c concept of pointer is very useful. A pointer is variable that holds address of object. We have defined two pointers that will be operated according to the size of the objects. Different from java, it instantiates an object and returns a pointer to it. Pt will hold address of unnamed object. Simple arithmetic operators can be used to increment or decrement the addresses, based on the size of the object. In java, new returns a reference to an object as pointers do not exist. To get the address of an object or variable or primitive type, the address operator & is used. To actually get the value, the dereference operator * is used. If the pointer is to an object that has a member which needs to be accessed, the indirect member selection -> may be used.