Answer to Question #262857 in Algorithms for Dion Martins

Question #262857

Choose the correct answer



1. Which of the following is true with regards to functions?


a. A program can have more than one function and they must always return a value to the calling


module.


b. Values that are passed to a function in the calling module are referred to as parameters.


c. You can define your function inside another function as long as you want to use the


functionalities of it.


d. The function procedure will always receive values parameters and it may not alter the original


values.



2. Which of the following statement is true about overloaded functions?


a. Two or more functions with same name and consists of more than one parameter.


b. Two or more functions with the same name but different in their parameter list.


c. Two or more functions and they do not return any value to the calling module.


d. Two more functions with the same number of value and reference parameters.



1
Expert's answer
2021-11-08T17:36:19-0500

1.

a. false: Void functions do not return a value after the function executes


b. false: Parameters are the names of the information that we want to use in a function or procedure. The values passed in are called arguments.


c. false: A function cannot be defined inside the another function, but a function can be called inside a another function, because after returning a value the control is given back to calling function.


d. true: You're passing the parameter as an IN parameter - that means you can't change it, which if you think about it, makes sense. It's a constant, in effect.


2.

Answer: b. Two or more functions with the same name but different in their parameter list.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS