57.7k views
2 votes
The function prototype double mySqrt(int x); Declares a function called mySqrt which takes a double as an argument and returns an integer. Defines a function called mySqrt which takes an argument of type x and returns a double. Declares a function called mySqrt which takes an integer as an argument and returns a double. Defines a function called double which calculates square roots.

User Lin Ma
by
5.8k points

2 Answers

5 votes

Final answer:

The prototype 'double mySqrt(int x);' declares a function called mySqrt which takes an integer as an argument and returns a double, most likely intended to calculate square roots.

Step-by-step explanation:

The function prototype double mySqrt(int x) does not declare a function that takes a double as an argument and returns an integer. Nor does it define a function called double which calculates square roots. Instead, this prototype declares a function named mySqrt that takes an integer as an argument and returns a double. This implies that the function mySqrt is likely designed to calculate the square root of an integer and return the result as a double-precision floating-point number.

User Charles Lohr
by
6.2k points
3 votes

Answer:

A) declares a function called mySqrt that takes integer as argument and returns double.

Step-by-step explanation:

User Shasi Kanth
by
7.0k points