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;
}
人气:132 ℃ 时间:2020-03-26 01:19:11
解答
所以我说问错地儿了
建议你丢到编程板块去
推荐
猜你喜欢
- In order to encourage the students to study hard,the schoolmaster will give the scholarship to ______got the first prize
- 《醉花阴》中“人比黄花瘦”是千古流传的佳句,以花比人,其中的“瘦”字有什么作用
- 304287读作什么
- 一国两制的基本含义和基本内容?
- 判断1除一个数(0除外)的商,等于这个数的倒数
- 设A=a²+b²-c²,B=-4a²+2b²+3c²,并且A+B+C=0,求C
- 英语“一些;一点”的用法?就是那些短语后加什么 以及理解意思
- 就是关于”快乐假期,轻松阅读“写一篇作文,我不知道该写什么题材,谢