Answer the following questions true (T) or false (F)

1. A pointer is an address, an address is an integer, but a pointer is not an integer.

2. You can get a pointer value to initialize a pointer variable from an object of an appropriate type with the “address-of” operator, &.

1. True
Explanation: Not crazy, rather this is an abstraction. The type system in C++ is sufficiently strong that it requires that you not assign pointer values to other types nor other types to pointers (without a cast, but that tells the compiler you know what you are doing, so it lets you.)
2. True
Explanation: Every object has a value and an address. The & “address-of” operator extracts the address to make it available to initialize a pointer variable of appropriate type. Example: int x; int *ptrX = &x;

Computer Science & Information Technology

You might also like to view...

________ technology helps people with disabilities interact with technology

Fill in the blank(s) with correct word

Computer Science & Information Technology

If you select a word, the Mini toolbar will appear

Indicate whether the statement is true or false

Computer Science & Information Technology