由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - one C++ question
相关主题
请教: c++ 重载问题pass arguments by reference in R (转载)
about MatLab programming (转载)来几个C++测试题
a C++ QuestionDefault function template arguments
R中By函数是什么意思 (转载)C++ Q 103-105
有coskewness,cokurtosis的公式么?A simple problem on Flex
一个悉尼的对冲基金的c++面试A simple problem on Flex
求教 - jquantlibC里面有没有default argument这么一说,是不是只有在C++里有这个feature?
solve an optimization model with integral as constraints (转载)A simple question on Flex
相关话题的讨论汇总
话题: default话题: arguments话题: c++话题: question话题: correct
进入Quant版参与讨论
1 (共1页)
M*********t
发帖数: 257
1
Question: Which of the following statements regarding functions' default
arguments in C++ are correct?
A. Default arguments cannot be of pointer type.
B. Default arguments exist in the global heap and not on the function's
stack.
C. Default arguments cannot be of a user-defined type.
D. Default arguments can never precede non-default arguments.

E. Default arguments are not considered for generating the function's
signature.
multiple choices up to 3 could be correct
Thank
x**p
发帖数: 105
2
E



【在 M*********t 的大作中提到】
: Question: Which of the following statements regarding functions' default
: arguments in C++ are correct?
: A. Default arguments cannot be of pointer type.
: B. Default arguments exist in the global heap and not on the function's
: stack.
: C. Default arguments cannot be of a user-defined type.
: D. Default arguments can never precede non-default arguments.
:
: E. Default arguments are not considered for generating the function's
: signature.

j******n
发帖数: 271
3
???

【在 x**p 的大作中提到】
: E
:
:

m********0
发帖数: 2717
4
agree,
A, B, C, D are wrong anyway.

【在 x**p 的大作中提到】
: E
:
:

b********u
发帖数: 63
5
D is correct.
E is wrong - default arguments still appear in the function name mangling.
The compiler automatically push them in the stack
x**p
发帖数: 105
6
u r right.

【在 b********u 的大作中提到】
: D is correct.
: E is wrong - default arguments still appear in the function name mangling.
: The compiler automatically push them in the stack

m********0
发帖数: 2717
7
恩。D是对的。
我原来以为这样的写法编译器会接受,只是default失去意义而已。
试了一下两个编译器,这样是不接受的。提示后面的非default
参数缺少default value。
想当然了

【在 b********u 的大作中提到】
: D is correct.
: E is wrong - default arguments still appear in the function name mangling.
: The compiler automatically push them in the stack

s*****r
发帖数: 773
8
B 不对么?
default arguments are static binding.



【在 M*********t 的大作中提到】
: Question: Which of the following statements regarding functions' default
: arguments in C++ are correct?
: A. Default arguments cannot be of pointer type.
: B. Default arguments exist in the global heap and not on the function's
: stack.
: C. Default arguments cannot be of a user-defined type.
: D. Default arguments can never precede non-default arguments.
:
: E. Default arguments are not considered for generating the function's
: signature.

d********e
发帖数: 132
9
请问这种知识点怎么准备?
1 (共1页)
进入Quant版参与讨论
相关主题
A simple question on Flex有coskewness,cokurtosis的公式么?
gdb里怎么call member function一个悉尼的对冲基金的c++面试
C++ Q 103-105 (转载)求教 - jquantlib
再一次请教apply function 在R中的应用solve an optimization model with integral as constraints (转载)
请教: c++ 重载问题pass arguments by reference in R (转载)
about MatLab programming (转载)来几个C++测试题
a C++ QuestionDefault function template arguments
R中By函数是什么意思 (转载)C++ Q 103-105
相关话题的讨论汇总
话题: default话题: arguments话题: c++话题: question话题: correct