Ask Question

What is the difference between an argument and a parameter?

+2
Answers (1)
  1. 26 December, 18:55
    0
    Explanation

    Parameter is basically a variable which is defined by a method/function.

    When a method/function is called then this Parameter receives the value.

    In any method/function, Parameter works as recipient.

    If we pass a value In a method/function when it invokes then that value is

    called Argument. In any method/function, Argument works as agent.

    Example:

    / / here p1 and p2 are parameters in the method

    fun test (p1, p2)

    {

    return p1+p2;

    }

    / / here 2,6 are Argument in the method

    test (2,6);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the difference between an argument and a parameter? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers