Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, March 16, 2015

What is formal arguments?

The formal arguments are the type of argument. It receives the information from the actual arguments at the time of function call and used the information in function. The formal arguments are those arguments that are declared in the function definition and used within the function body.
The scope of the formal argument is local i.e. it is used only in the function not outside the function. Formal arguments receive either a photocopy of values or the memory address of the actual arguments.  
ex:
void sum(int x, int y) //  x and y are formal arguments.
{
     int sum;
     sum = x + y;
     printf(“SUM = %d”, sum);
}

Here x and y are the formal arguments, x and y receive the copy of values of the actual argument and print the sum of values.

No comments:

Post a Comment