Ask Question

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);

+4
Answers (1)
  1. 20 December, 15:00
    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?
Find 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 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