actual and formal parameters – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-ICSE2016-02C #JAVA#4225    siteicon   siteicon  

Problem Statement - actual and formal parameters

Differentiate between formal parameter and actual parameter.

Solution

TC++ #4225

Formal Parameters are parameters or arguments of a function or metod which are present in the header of a function definition. For e.g. in the following function
int add(int a, int b) {    return a+b; }
a and b are formal parameters.

Actual parameters are used at the time of method or function invocation. For e.g. in the following statement
int x=add(2,3);
values 2 and 3 are actual parameters.

 


Share

sunmitra| Created: 31-Mar-2018 | Updated: 16-Apr-2019|ICSE2016









Back