Computer Applications
Identify the errors in the function skeletors given below :
float average (a, b) { }
User Defined Methods
7 Likes
Answer
The data type of arguments a and b is not specified.
The prototype of the function must specify the data type of the formal parameters. The correct statement is as follows:
float average (float a, float b) { }
Answered By
3 Likes
Related Questions
What is the condition of using a function in an expression ?
When a function returns a value, the entire function call can be assigned to a variable. (T/F) ?
Identify the errors in the function skeletors given below :
float mult (int x, y) { }Identify the errors in the function skeletors given below :
float doer (int, float = 3.14) { }