Question: In C++ G. 17 1) Can a reference be the return type for a function? A- Yes, but it must be a reference to a

In C++ G. 17

1) Can a reference be the return type for a function?

A- Yes, but it must be a reference to a const type.

B - Yes, all reference types are allowed to be return types.

C - No, regular and pointer types are the only allowed return types from a function.

D- No, only regular (non-reference and non-pointer) types are allowed to be returned from a function.

2) Which of the following is expected to have a different size (memory footprint) than a pointer to int (i.e., int*)?

A -char *

B -int **

C- long *

D- double *

E- None of the above

3) What happens if you dereference an int?

A- Compiler Error

B- Runtime Error

C- It returns a reference to itself

D- Nothing (no operation occurs)

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!