Computer Science, asked by divya886, 10 months ago

✨hola guys!! ✨

# ❎❎NO SPAMS❎❎#


what is the difference between actual paremeter and formal parameter ?(give 2 points)❣️



the 1st one to answer my question correctly with nice explanation will be marked as brainliest ✌️

so guys go for it ❣️​


Iloveyouji45: hii

Answers

Answered by kushankur99
0

Actual Parameter is the method in which we declare values to the variables.

Formal parameter is the parameter which contains some other values and variables than those in the actual parameter.

Formal parameter is used to call the actual parameter.


divya886: it's not fully correct and I asked for 2 points
kushankur99: hmm
Answered by siddhartharao77
14

Actual arguments:

(i) Actual arguments are values that are passed to a function when it is invoked.

(or)

The values that are passed to the called function from main function are actual parameters.

(ii) These are passed by the calling function.

Formal Arguments:

(i) Formal parameters variables declared in the function prototype (or) declaration.

(ii) These are in the called function (or) they belong to the called function.

Example:

void sum(int);

int main()

{

int a = 5;

printf("The value of a = %d", a);

sum(a);

return 0;

}

void sum(int b)

{

b++;

printf("The value of b = %d", b);

}

Output:

The value of a = 5

The value of b = 6

Explanation:

The variable b is called as formal parameter and the variable a is called as actual parameter.

Hope it helps!


Topperworm: Superb answer Dear
siddhartharao77: Thanks dear
divya886: nyc answer
siddhartharao77: Thank you
divya886: my most welcome ❣️
junnusatvika: sorry Annaya
Similar questions