l*0 发帖数: 19 | 1 是个面试测试题,下面几个都拿不准,大家讨论啊!
Which of the following statements regarding default arguments of functions
are correct?
A. Default arguments can never precede non-default arguments
B. Default arguments are not considered for generating the function's
signature
C. Default arguments cannot be of pointer type
D. Default arguments exist in the global heap and not on the function's
stack
E. Default arguments cannot be of a user-defined type
A?
which of the following is not a unary operator?
A. !
B. %
C. +
D. |
g****n 发帖数: 14 | 2 Which of the following statements regarding default arguments of functions
are correct?
A. Default arguments can never precede non-default arguments
Yes.
B. Default arguments are not considered for generating the function's
signature.
No. The default values are not considered for generating the function's
signature. The type of the formal arguments are included in the function's
signature.
C. Default arguments cannot be of pointer type
No.
D. Default arguments exist in the global heap and not on |
f******n 发帖数: 90 | 3
Where are the values of the default arguments stored?
how to use it as a unary?
-
a
A
This syntax looks strange, can you write a complete statement to show how
to use it?
【在 g****n 的大作中提到】 : Which of the following statements regarding default arguments of functions : are correct? : A. Default arguments can never precede non-default arguments : Yes. : B. Default arguments are not considered for generating the function's : signature. : No. The default values are not considered for generating the function's : signature. The type of the formal arguments are included in the function's : signature. : C. Default arguments cannot be of pointer type
|
g****n 发帖数: 14 | 4 write a reference name r to a pointer to an array of 5 integers
This syntax looks strange, can you write a complete statement to show how to
use it?
In C++, a pointer to an array usually means a pointer to the first element
of the array.
int (*&r)[5]; is also OK. But you need to use (*r)[i] to access the i-th
element. |