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