Difference between an argument and a parameter?
Answer Posted / dev
The words argument and parameter are often used
interchangeably although the C++ Standard makes a clear
distinction between the two.
An argument is an expression in the comma-separated list in
a function call or the operand of a throw-statement
A parameter is an object or reference that is declared in a
function declaration or definition (or in the catch clause
of an exception handler);
This example demonstrates the difference between a
parameter and an argument:
void func(int n, Object obj); //n and obj are parameters
static void main(String s[])
{
Object p = new String("hi");
func(5, p); //5 and p are arguments
}
Is This Answer Correct ? | 155 Yes | 23 No |
Post New Answer View All Answers
what is ststic with example
What is the difference between state-based unit testing and interaction-based unit testing?
What is a functional interface?
How do you write methodology?
How is abstraction implemented in java ?
'A class is a template for an object' explain this statement.
Why we used vector class?
What is member in java?
Name component subclasses that support painting in java programming?
What is java life cycle?
What is java full form?
Does java support multiple inheritance or not?
Why are the destructors for base class and derived class called in reverse order when the program exits
How is a variable stored in memory?
Can we use a default constructor of a class even if an explicit constructor is defined?