Ask Question
17 February, 14:00

Consider the following function definition. Double funcTest (string name, char u, int num, double y) { } Which of the following is the correct function prototype for the function funcTest? a) double funcTest (string, char, int, double); b) int funcTest (string n, char ch, int x, double t); c) double funcTest (name, u, num, y); d) void funcTest (string, char, int, double);

+2
Answers (1)
  1. 17 February, 14:27
    0
    The answer is "Option A"

    Explanation:

    The prototype of the method is also known as the method declaration, in which it defines the name, arguments and return type of the method. It can't define the method body. It offers to the compiler, to inform the function, which can be used in this program later, and wrong option can be described as follows:

    Option b and Option d both were wrong because, Its uses return type int and void, which is not used in method its return type. In option c, It is wrong because, in method prototype, we use datatypes in parameters, not names.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider the following function definition. Double funcTest (string name, char u, int num, double y) { } Which of the following is the ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers