Parameters and arguments
Understanding Parameters and Arguments in Programming
public int AddNumbers(int a, int b) // a and b are parameters with integer datatypes
{
return a + b;
}def add_numbers(a, b): # a and b are parameters but no datatypes are declared
return a + bint result = AddNumbers(5, 3); // 5 and 3 are argumentsresult = add_numbers(5, 3) # 5 and 3 are argumentsKey Differences
Last updated
Was this helpful?