What is difference between a formal and an actual parameter?

The variables declared in the procedure and which are passed, as arguments are called actual, the parameters in the procedure declaration. Actual parameters contain the values that are passed to a procedure and receive results. Formal parameters are the placeholders for the values of actual parameters

Showing Answers 1 - 24 of 24 Answers

anil

  • Nov 10th, 2006
 

Actual parameter versus Formal ParametersActual parameters are variables or expressions referenced in the parameter list of subprogram callFormal parameters are variables or expressions declared in the subprogram specificaion and referenced in the subprogram body

  Was this answer useful?  Yes

Formal Parameter: A variable declared in the parameter list of a subprogram specification
Example:
create or replace procedure/function x (p_id number, p_sal number)

Actual Parameter: A variable or expression refrenced in the parameter list of a subprogram call.
example:
execute x( 100,v_sal)

krishna

  • Aug 8th, 2011
 

Parameters which are in calling subprogram are actual parameters.

Parameters which are in called subprogram are formal parameters.

If any subprogram was called, once the call was completed then the values of formal

  Was this answer useful?  Yes

Rakesh Bawa

  • Aug 11th, 2011
 

The Parameters that appear in method call statement is called Actual Parameter.The parameter that appear in method definition is called formal parameter

Rakesh Bawa

  • Aug 11th, 2011
 

The variables declared in the procedure and which are passed, as arguments are called actual, the parameters in the procedure declaration. Actual parameters contain the values that are passed to a procedure and receive results. Formal parameters are the placeholders for the values of actual parameter

  Was this answer useful?  Yes

ABHISHEK KUMAR

  • Nov 10th, 2014
 

1)Actual parameters are used in a calling function when a function is invoked and formal parameters are used in a function header....
for eg:-c=add(a,b) here a and b are actual parameters and int add (int a ,int b) here a and b are formal parameters.
2) actual parameters can be constants ,variables or expression. But formal parameters are only variables.
3)Actual parameters sends value to the formal parameters . formal parameters receive values from actual parameters.

  Was this answer useful?  Yes

Ravindra Kumar

  • Dec 7th, 2015
 

The actual parameter is when you actually pass real value in calling that function. And, the formal parameter is the parameter as defined on the function signature.

  Was this answer useful?  Yes

srinivas

  • Feb 5th, 2016
 

How can I differentiate local veritable and formal parameter? In class I have variable called a, in that class one method has formal parameter is "a" and another local variable also "a".

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions