Similar Books


    No books found

Title
Chapter: 2 / Q: 2.42
Write your own version of the Sales_data.h header and use it to rewrite the exercise from § 2.6.2 (p. 76)
Chapter: 2 / Q: e.g2.3.2.1
We define a pointer type by writing a declarator of the form *d, where d is the name being defined. The * must be repeated for each pointer variable
Chapter: 2 / Q: e.g2.3.2.2
A pointer holds the address of another object. We get the address of an object by usin the address-of operator (the & operator)
Chapter: 2 / Q: e.g2.3.2.3
The types of the pointer and the object to which it points must match
Chapter: 2 / Q: e.g2.3.2.4
When a pointer points to an object, we can use the dereference operator (the * operator) to access that object
Chapter: 2 / Q: e.g2.3.2.5
Dereferencing a pointer yields the object to which the pointer points. We can assign to that object by assigning to the result of the dereference
Chapter: 2 / Q: e.g2.3.2.6
A null pointer does not point to any object. Code can check whether a pointer is null before attempting to use it. There are several ways to obtain a null pointer
Chapter: 2 / Q: e.g2.3.2.7
It is illegal to assign an int variable to a pointer, even if the variable’s value happens to be 0
Chapter: 2 / Q: e.g2.3.2.8
Assignment makes the pointer point to a different object
Chapter: 2 / Q: e.g2.3.2.9
So long as the pointer has a valid value, we can use a pointer in a condition. Just as when we use an arithmetic value in a condition (§ 2.1.2, p. 35), if the pointer is 0, then the condition is false
total questions: 591

Questions

591

Views

A PHP Error was encountered

Severity: Warning

Message: Undefined property: stdClass::$TotalViews

Filename: books/book.php

Line Number: 411

Best Answers

299

Points

5