Question: c++ a. Which arithmetic operations can be performed on pointers? 1. Multiplication, division, addition, and subtraction 2. All arithmetic operations that are legal in C++

c++

a. Which arithmetic operations can be performed on pointers?

1.

Multiplication, division, addition, and subtraction

2.

All arithmetic operations that are legal in C++

3.

Only multiplication and addition

4

Addition , subtraction , preincrement, and postincrement

5.

None of the above

b. A function may return a pointer, but the programmer must ensure that the pointer ________.

1.

has not previously been returned by another function

2.

has been assigned an address

3.

is pointing to an object that is still valid after the return of the function

4.

was received as a parameter by the function

5.

None of the above

c. A pointer may be initialized with ________.

1. the value of a floating-point variable

2. the address of an existing object of the appropriate type

3. the value of a floating-point constant

4. All of the above

5. None of the above

d. The statement double *num; ________.

1. initializes a variable called *num

2.defines a variable of type double called num

3.defines a pointer variable called num

4.defines and initializes a pointer variable called num

5.None of the above

e. The term pointer can be used interchangeably with ________.

1. variable

2. address

3. counter pointer

4. decimal pointer

5. None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!