Which one of the following function declarations do you use for a function that takes a variable number of parameters and uses all of them? A. void function (first, others[]); B. void function(argc, *argv[]); C. void function(...); D. void function(int first, ...); E. void[] function(); 觉得b,d 都行啊~
【在 m****v 的大作中提到】 : : i mean, maybe only d can be compiled, so we have to select d?
p*n
19 楼
内部tansfer没见过。TT都national search
n*0
20 楼
can anybody implement one for me?
d*t
21 楼
B and C?
【在 h*****g 的大作中提到】 : Which one of the following function declarations do you use for a function : that takes a variable number of parameters and uses all of them? : A. : void function (first, others[]); : B. : void function(argc, *argv[]); : C. : void function(...); : D. : void function(int first, ...);
d*t
22 楼
I think D is only valid in C, not C++.
【在 h*****g 的大作中提到】 : 对 答案给的是d
S*I
23 楼
it is valid in C++
【在 d********t 的大作中提到】 : I think D is only valid in C, not C++.
d*t
24 楼
But in C++ function() means taking no parameter at all.
【在 h*****g 的大作中提到】 : Which one of the following function declarations do you use for a function : that takes a variable number of parameters and uses all of them? : A. : void function (first, others[]); : B. : void function(argc, *argv[]); : C. : void function(...); : D. : void function(int first, ...);
B*5
26 楼
这种东西从来没用过。。。
a*m
27 楼
这句话没看懂。c里面也一样吧。
【在 d********t 的大作中提到】 : But in C++ function() means taking no parameter at all.