0
What is the difference between a parameter and an argument in a function?
1 Odpowiedź
+ 3
Parameter is the variable declared in the function's prototype.
int sum (int a, int b){
//here a and b are parameters
}
Argument is the value passed while function call, which can be literal or variable.
cout << sum (23, 45);
//here 23 and 45 are arguments