Which of the following are correct? Why are the others incorrect?

When a function having an array formal parameter is called, the formal array
parameter …
a) names a copy of the array argument.
b) refers to exactly the same array as the calling program
c) is passed the address of the argument, and the function needs further information
about the array size to safely use an array parameter
d) refers to the array using a name that is always different from the calling program's
argument.

c) is passed the address of the argument, and the function needs further information
about the array size to safely use an array parameter

The rest are wrong. Answer a) suggests passing of arrays is call–by-
value,. (It is not.) Answer b) suggests that the size of an array parameter is known to
the function. (It is not.). Answer d) suggests that we cannot use the same identifier in
the formal parameter and the argument. (Of course we can.)

Computer Science & Information Technology

You might also like to view...

Which of the following is a hardware or software device that controls traffic and limits specific activity?

a. IDS b. Firewall c. Honeypot d. Honeynet

Computer Science & Information Technology

Which following search mode toggles behavior based on the type of search being run?

A) Smart B) Fast C) Verbose

Computer Science & Information Technology