Computer Applications
Identify the errors in the function skeletors given below :
float doer (int, float = 3.14) { }
User Defined Methods
3 Likes
Answer
Assignment is not allowed in function prototype. The argument list must contain the data type along with the variable name. The correct statement is as follows:
float doer (int n, float pi) { }
Answered By
3 Likes
Related Questions
Identify the errors in the function skeletors given below :
float average (a, b) { }Identify the errors in the function skeletors given below :
float mult (int x, y) { }Given the method below, write a main() method that includes everything necessary to call given method.
int thrice (int x) { return x * 3 ; }What is the principal reason for passing arguments by value ?