198k views
3 votes
(1 consider the following function definition: int func(int x, double y, char u, string name { //function body } which of the following are correct function prototypes of the function func? explain why.

a. int func(x, y, u, name;
b. int func(int s, double k, char ch, string name;
c. int func(int, double, char, string;
d. func(int, double, char, string

1 Answer

4 votes
When prototyping an function also known as a function declaration at least in C++, we type out the function's return type, the name of the function and the parameters.

So, the answer would be B. int func(int s, double k, char ch, string name);
User Beggarman
by
8.1k points