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) Zero or more call-by-value parameters in a function may have default arguments., c) If a function has a reference parameter, no parameters to the left of the reference parameter may have default arguments., and d) If a parameter is missing a default argument, no parameters to the left of this point may have a default argument.

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...

Which of the following describes the results of hiding text in Word?

a. The text is deleted from the document. b. The text is moved to the clipboard. c. The text does not appear in the document.

Computer Science & Information Technology

All materials project shadows

A. True. B. False. C. True, unless you set them not to project shadows. D. Transparent materials don't project shadows.

Computer Science & Information Technology