208k views
3 votes
Either a function’s _________ or its _________ must precede all calls to the function.

User Octavn
by
5.4k points

2 Answers

3 votes

Answer:

definition , prototype

Step-by-step explanation: A function's definition and it's prototype must come before a function call otherwise the compiler will throw an error of undefined function whatever is the function name. Defining or giving prototype before the function call.The compiler will get to know that there a function exists with the function name and it will not give an error.

User Jeff Trull
by
5.6k points
2 votes

Answer:

Definition, Prototype

Step-by-step explanation:

A function prototype is the one who declares return type,function name and parameters in it.

Syntax of function prototype

returnType functionName(type1 argu1, type2 argu2,...);

Function definition contains the block of code to perform a specific task.

Syntax of function definition

returnType functionName(type1 argu1, type2 argu2, ...)

{

//body of the function

}

Whenever a function is called, the compiler checks if it's defined or not and control is transferred to function definition.

So,it is necessary to define the return type and parameters of the function.

User Otravers
by
5.7k points