If the programmer is writing a function that requires four input values, but most of the time when the function is called, three of the inputs are the same (only changed occasionally). How should the programmer design this function?

What will be an ideal response?

This function should use a default parameter list prototype statement. The input value that needs to change often is first in the list, followed by the three inputs that don’t change. The three constant values would be assigned into the variables in the prototype statement.

Computer Science & Information Technology

You might also like to view...

Using functions in a program is known as

a. data abstraction b. procedural abstraction c. poor programming style d. calculus

Computer Science & Information Technology

An example of a metric used for profile-based intrusion detection is _________ which is a non-negative integer that may be incremented but not decremented until it is reset by management action. Examples include the number of logins by a single user during an hour, the number of times a given command is executed during a single user session, and the number of password failures during a minute.

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

Computer Science & Information Technology