answersLogoWhite

0

A formal perimeter refers to an identifier that is used in a method to stand for the value that is passed into the method by a caller. An actual perimeter on the other hand refers to the actual value that is passed into the method by a caller.

User Avatar

Wiki User

10y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
ReneRene
Change my mind. I dare you.
Chat with Rene
More answers

The "formal parameter" refers to the variable name you use in the function definition, the "actual parameter" is the actual value you pass in a particular case. If your function is defined something like:

MyFunction(x)

{

...

}

And you invoke it with:

MyFunction(10)

or:

MyFunction(a)

Then the variable "x" is the formal parameter; the value 10 or a is the actual parameter.

User Avatar

Wiki User

10y ago
User Avatar

While passing variable in a function the parameters featuring the calling functions are actual parameters while those featuring in the called function are formal parameters.

eg

void somefunc(int formal)

{

cout<<formal;

}

int main()

{

int actual;

somefunc(actual);

}

Here variable formal is formal parameter and actual is actual parameter

User Avatar

Wiki User

14y ago
User Avatar

Formal parameters are those that appear in a function's prototype, using the parameter names provided by the function implementation (which may differ from the names used in the function prototype), and that are subsequently used in the function body.

Actual parameters are those parameters that are passed by the calling function.

Actual parameters are evaluated and passed to the function via its formal arguments.

User Avatar

Wiki User

12y ago
User Avatar

formal parameter is we accept in function body/defination

actual parameter is we pass from calling function to function body.

Ex :

int a,b;

void add (a,b) ; where a & b is actual parameter // calling function

void add(int i,int j) where i & j are formal parameter // function body

{

}

By Darshan Paliwal

User Avatar

Wiki User

12y ago
User Avatar

An actual parameter is a value supplied to a method or function in programming.

User Avatar

Wiki User

10y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What is an actual parameter?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

In python are actual and formal parameters matched up by position or name?

When we invoke a function, we pass the actual arguments in the same order specified by the function's formal arguments, thus it is the relative position that determines how they are matched. Note that actual parameter names are within the scope of the calling code while formal parameter names are scoped to the function in which they are declared. The calling code has no access to the formal argument names, and the function may or may not have access to the actual argument names. Python uses the pass-by-object paradigm: if the object being passed is immutable, then it is passed by value (the formal parameter is assigned a copy of the object's value), otherwise it is passed by reference (in which case the formal argument becomes an alternative name for the actual argument).


What is difference between parameter and argument in java?

They are synonyms.Some people use the word 'argument' for the 'formal parameter' and 'parameter' for the 'actual parameter', others do on the other way around.PS:example for the formal parameters (function declaration):int myfun (const char *s, int p);example for the actual parameters (function calling):myfun ("Hello", 44);


Explain the difference between an argument and a parameter Use a C plus plus program segment to illustrate your answer?

In C++ there is no such thing as a parameter, there are only arguments, both actual and formal. Some languages use the term parameter to mean a formal argument and argument to mean an actual argument, while others reverse the meanings completely. Some languages make no distinction at all and use the terms parameter and argument interchangeably. However, C++ is quite clear on this: actual arguments are the names that you pass to a function, while formal arguments are the names received by the function. Even so, you will still encounter incorrect usage of the terms parameter and arguments, even by C++ experts (myself included!) The following example code demonstrates the difference between an actual argument and a formal argument, as the terms apply in C++: int foo(int formal) { return(formal*2); } void bar(int&amp; formal) { formal*=2; } int main() { int actual=1; actual = foo(actual); bar(actual); return(0); } The function foo() declares a formal argument by value while bar() declares a formal argument by reference. In main() we declare a variable with the name actual and pass this actual argument to both functions in turn. When we pass actual to foo(), the value of actual is assigned to formal. Since formal is a copy of actual, they are separate names with separate values (initially they will have the same value of course). Thus any changes made to formal will have no effect on actual, hence we must assign the return value from foo() to actual in main(), in order to record the change made by foo(). When we pass actual to bar(), a reference to actual is assigned to formal. A reference is simply an alternate name for the same argument, however the name actual is not visible to bar(), so they are still separate names, but they always have the same value. Thus any changes to formal will affect actual, thus there is no need to assign any return value to record the change.


What is the r-parameters of transistor?

r parameter is resistance parameter


What is the desired target value for a parameter?

The target value of a parameter is the perimeter.