222k views
5 votes
A function is executed when it is

A.
defined

B.
prototyped

C.
declared

D.
called

1 Answer

3 votes

Answer:

D. called

Step-by-step explanation:

A function is executed when it is called.

Function definition comprises of the code body of the function.For example:

int add(int a, int b){

return a+b;

}

Function declaration or function prototype specifies the signature of the function ( number and type of arguments, return type). e.g,

int add(int a,int b);

Function call is when the function is executed with actual arguments:

add(2,4);

This will return 6 upon execution of function body.

User GabrielaBezerra
by
7.0k points