Here are several function members of a class. Tell whether each may be used as an l-value, only, an r-value only or both. B is a class that has mutators.
a. //declarations of these appear together in the //definition of class A
int& A::f( ){ /* */}
const int& A::f( )const{ /* */}
b. const int& A::f( ){ /* */}
c. const B A::f( ){ /* */}
d. B A::f( ){ /* */}
In a) the first will be used if f() is used as an l-value, and the second implementation will be used if f() is used as an r-value.
In b) f() can be used as an r-value only.
In c) f() can be used as an r-value only and no mutators can be called on the return value.
In d) f() can be used as an r-value only, but mutators can be called on the return value
You might also like to view...
Designed version of font used to set off quotes, emphasized text, foreign words, scientific names, and movie titles with appropriate differences that is not slanted normal text.
a. Italic b. Oblique c. Bold d. Faux italic
It can be helpful to display nonprinting characters when trying to fix formatting errors in a document caused by excessive spaces, blank lines, or tabs
Indicate whether the statement is true or false
Which of the following statements about animations is NOT true?
A) Animations can be applied to an individual slide, a slide master, or a custom slide layout. B) Animations can decrease file size. C) Too many animations might cause viewer discomfort. D) The overuse of animations can detract from a professional presentation.
The ____________________ statement is used to execute specific programming code if the evaluation of a conditional expression returns a value of true.
Fill in the blank(s) with the appropriate word(s).