Answer the following statements true (T) or false (F)

1. There is no problem with the compiler distinguishing these two function definitions:
```
void func(double x){/*…*/}
int func(double x){/*…*/ return something_double;}
{/code
2. The compiler ha no problem distinguishing these two function definitions:
```
void func(double &x){/*…*/}
void func(double x){/*…*/}
```
3. Mixing call-by-reference and call-by-value parameters is strictly prohibited.
4. Default arguments can be used with either call-by-value or call-by-reference
parameters.


1. False
C++ does not distinguish functions based solely on the return value.
2. False
C++ does not distinguish functions based solely on call-by-value vs.
call-by-reference.
3. False
Whether a given parameter is call-by-value or call-by-reference depends
on whether there is an ampersand present. It is perfectly legitimate to mix call-by-
value and call-by-reference parameters.
4. False
The text says “[Default arguments] do not make sense for call-by-
reference parameters.” Suppose the function writes to the parameter. What does the
parameter cause to be changed in the caller?

Computer Science & Information Technology

You might also like to view...

You cannot enter a formula with an incorrect structure in Excel. If you attempt to do so, a(n) ____ appears, explaining the error and providing a possible correction.

A. error message B. dialog box C. Formula Wizard D. none of the above

Computer Science & Information Technology

A(n) _____ is software that protects corporate data from being sent outside the corporate network

Fill in the blank(s) with correct word

Computer Science & Information Technology

Because several of the basic formatting elements are so commonly used, they are not deprecated in XHTML Strict.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

You cannot use qualitative measures to rank information asset values.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology