101k views
1 vote
Look at the following function prototype.

int myFunction(double);

What is the data type of the function's parameter variable?
A) int
B) double
C) void
D) Can't tell from the prototype

User Pia
by
7.9k points

1 Answer

4 votes

Final answer:

The data type of the parameter variable in the function prototype 'int myFunction(double);' is double (option B).

Step-by-step explanation:

Looking at the function prototype int myFunction(double); the data type of the function's parameter variable is double.

The prototype indicates the function myFunction is expected to take one argument when it is called, and that argument must be of the double data type. The return type of the function is int, meaning after execution, the function will return an integer value.

Therefore, the correct answer to the question is B) double.

User Ryan Morlok
by
8.7k points