What is Actual and Formal Parameters ?

Consider the following code that will explain what is actual parameters and formal parameters respectively

Dealing with Formal and actual parameters

In the above code snippet you have noticed what is formal parameters and actual parameters.The parameters that are passed in the function are called as Formal Parameters and the one which are being invoked or called at the time of object creation in this code snippet is called as Actual Parameters.

Tip: If the value of x or y in the above code snippet is double or float it gets converted automatically to integer(as we defined in function) .We may refer it is Type conversion

NOTE:Actual parameters are also called as Arguments

--

--