Ask Question

Look at the following function prototype. double mynewFunction (int); What is the data type of the function's return variable?

a. double

b. string

c. void

d. int

+2
Answers (1)
  1. 30 May, 22:20
    0
    The answer is A) Double.

    The return type is specified before the method's signature, and the signature is composed of the the method's name and parameters.

    In this case, the method is named mynewFunction, takes in an integer as a parameter, and returns a double.

    Also, fun fact which is kind of unrelated: if two or more methods have the same name, they can have different functionality as long as their signature is different (different parameter types).
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Look at the following function prototype. double mynewFunction (int); What is the data type of the function's return variable? a. double b. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers