what is the difference between parameter and argument in computer science?
The term parameter refers to any declaration within the parentheses following the function name in a function declaration or definition; the term argument refers to any expression within the parentheses of a function call.
1.parameter used in procedure defination
2.arguments used in procedure call
This example demonstrates the difference between a parameter and an argument:
void foo(int a,char b); //a and b are parameters,
here procedure is define
int main()
{
foo(5,'a'); //5 and 'a' are arguments,
here procedure is called
return 0;
}
人气:223 ℃ 时间:2020-03-26 01:19:11
解答
所以我说问错地儿了
建议你丢到编程板块去
推荐
猜你喜欢
- 加速度不变,速度可能不变.这句话对吗?
- 以往事为话题,写一篇文章,500字
- 由苯 乙醛 苯乙烯组成的混合物中 经测定其中碳的质量分数为27% 则该混合物中氧的质量分数为?
- 找规律填数2,10,10,66,26,218,50,514,82,1008,122 ,( );
- 在2、3、4、6、8、10、12中选出两对数,使它们的比值等于2.
- 配制浓度为20%的糖水1000克,需要用浓度为18%和23%的糖水各多少克?
- you,like,this,do怎样排队
- 2/3-1/9x=1/6怎么解方程