Write the function prototype for the function "sum" that takes an integar variable (x) as
its argument and returns a value of float data type.
Answers
Answered by
21
Answer:
The prototype is :
public float sum(int x)
Answered by
1
Answer:
the function prototype for the function "sum" that takes an integer variable (x) as its argument and returns a value of float data type is as follows :
float sum (int x);
Explanation:
Function declaration are called prototype, since they provide a model or blueprint for the function.
The Function prototype provides the following information about a function to be called –
- It tells about the return type of the function .
- Prototype tells the number of arguments should be passed to the function.
- It gives the information about the data types of each of the passed arguments.
- we get information about the order in which the arguments are passed to the function.
- The function prototype specifies what should be given to the function and what to expect from the function.
- The prototype of a function is also known as the signature of the function.
Similar questions
Hindi,
5 months ago
English,
5 months ago
Social Sciences,
5 months ago
English,
10 months ago
Social Sciences,
10 months ago
English,
1 year ago
Math,
1 year ago