For each of the following, write a single statement that performs the specified task. Assume that long variables value1 and value2 have been declared and value1 has been initialized to 200000.
a) Declare the variable longPtr to be a pointer to an object of type long.
b) Assign the address of variable value1 to pointer variable longPtr.
c) Display the value of the object pointed to by longPtr.
d) Assign the value of the object pointed to by longPtr to variable value2.
e) Display the value of value2.
f) Display the address of value1.
```
a) long* longPtr;
b) longPtr = &value1;
c) cout << *longPtr << '\n';
d) value2 = *longPtr;
e) cout << value2 << '\n';
f) cout << &value1 << '\n';
```
You might also like to view...
In the 5-layer reference model used with the TCP/IP Internet protocols, what is the purpose of each of the five layers?
What will be an ideal response?
A form is used to enter data into a(n) ________
Fill in the blank(s) with correct word
You can change a note's default ____ by clicking the File tab and then clicking Outlook Options.
A. color B. size C. font D. all of the above
Which of the following best describes WordArt?
A. A diagram that illustrates a concept or idea B. Decorative text C. A text box that includes a quotation D. A picture