Reference type is useful for
a. implementing call-by-reference
b. overloading operators in a natural way
c. return type from index operator overloading
d. different from the type the reference refers to, so ampersand must be used in the declaration in a class as well as in the separate definition
a), b) d) e) are correct.
Explanation: a) a call-by-reference parameter is a reference to the caller’s argument. b) The arguments are call-by-reference or const reference to enable changing the caller’s argument in case of an input argument, and to avoid copying in any event. c) reference return allows use as either an l-value or an r-value. d) remarks on the fact that if a parameter is double& both the definition and the declaration must use double& otherwise there will be linker error because the right function won’t be found.
You might also like to view...
When you add a mask, a layer mask thumbnail appears on the Layers panel in _________.
Fill in the blank(s) with the appropriate word(s).
When a field has an input mask, you can enter any data in that field
Indicate whether the statement is true or false
Practicing good, standard-based Web design means using HTML to define a document's structure and using ____ to control its presentation by defining visual properties.
A. XHTML B. CSS C. Java D. a graphics program
The expression primes = (2, 3, 5, 7, 11) creates a list named primes.
Answer the following statement true (T) or false (F)