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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started