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...
The operating system is loaded into memory during the _____.
A. ?swap process B. ?boot process C. ?sole process D. ?eviction process
?FileZilla is a free web hosting service.
Answer the following statement true (T) or false (F)
A password is not a personal identification number.?
Answer the following statement true (T) or false (F)
The JVM relies on the platform and various software technologies to present a secure location where Java programs run. This secure location is called a(n) ____ in JVM terminology.
A. procedure domain B. execution domain C. callbox D. sandbox