With regard to default arguments:

a. Zero or more call-by-value parameters in a function may have default arguments.
b. All value parameters must have default arguments.
c. If a function has a reference parameter, no parameters to the left of the reference parameter may have default arguments.
d. If a parameter is missing a default argument, no parameters to the left of this point may have a default argument.
e. Reference parameters can have default arguments.


a) c) d) are correct.
Explanation: a) you may, but you don’t have to have default arguments. b) is clearly wrong, there is no mandate that all value parameters have default arguments. If there are reference parameters mixed in, as in c) then value parameters to the left of the reference parameter cannot have default arguments. d) follows from the rules that reference parameters cannot have default arguments and that if any variables are missing default arguments, variables to the left may not have them either. Part e) is clearly wrong. Default arguments for reference parameters make no sense.

Computer Science & Information Technology

You might also like to view...

The sequence containers are array, vector, deque, ____________ and ________________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What happens when you click the double arrows above the Tools panel?

A. Both sets of tools are displayed B. The Tools window opens or closes C. Tools are displayed in one or two rows D. The secondary tools menu is displayed

Computer Science & Information Technology

On a Linux system, you can renew a DCHP address by using the command ipconfig/renew.

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

Computer Science & Information Technology

A ____ gives the user, or the user's application software, the ability to combine and manipulate data easily in ways that would be very difficult if the data were kept in separate and unrelated files.

A. file B. database C. datastore D. data system

Computer Science & Information Technology