Difference Between Actual Parameters and Formal Parameters | Actual vs Formal Parameters

Опубликовано: 08 Октябрь 2024
на канале: Qualified Geek
936
17

#programming #cs
Difference Between Actual and Formal Parameters | Actual vs Formal Parameters - Actual Parameters and Formal Parameters Explained

The main difference between Actual parameters and Formal Parameters is that formal parameters are those variables that are defined by programmers to receive the values when the function is invoked, Meanwhile, Actual parameters are those values that are passed by users or programmers to invoke the function. To clear up confusion, let's see an example, So here we have a function called "demo function" and it has two parameters a and b, and here a and b are formal parameters as I'm using them as variables to receive the value, and at last line, I'm calling the function using two actual parameters 9 & 10.