由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - C++ Q05: pointer to constant variable
相关主题
问一个 char * 和 char [] 的问题a simple C++ question
Go adopts JavaScript’s idea of semicolon insertiona question about const reference
why int** cannot convert to const int** ?请问一个关于 cost of pointer的问题
Help with a c++ const variable请教一个const pointer的问题
谁给解释一下这个c question问题
a pointer to a const addrC++ Function Pointer Array 的问题
请教大家一道C的面试题[c++] reference 真得不能bound to a second object 么?
一个简单的小问题最新某公司onsite面试题 (转载)
相关话题的讨论汇总
话题: const话题: variable话题: pointer话题: assigned话题: address
进入Programming版参与讨论
1 (共1页)
c**********e
发帖数: 2007
1
Which one of the following statements about const variables is true?
a) The address of a const variable can only be assigned to a float variable.
b) A pointer to a non-const cannot be assigned the address of a const
variable.
c) A pointer to a const can be assigned to multiple objects at compile time.
d) Pointers to const objects must be initialized to NULL before they can be
referenced.
e) A pointer to a non-const cannot be assigned the address of a volatile
variable.
E*U
发帖数: 2028
2
b

variable.
time.
be

【在 c**********e 的大作中提到】
: Which one of the following statements about const variables is true?
: a) The address of a const variable can only be assigned to a float variable.
: b) A pointer to a non-const cannot be assigned the address of a const
: variable.
: c) A pointer to a const can be assigned to multiple objects at compile time.
: d) Pointers to const objects must be initialized to NULL before they can be
: referenced.
: e) A pointer to a non-const cannot be assigned the address of a volatile
: variable.

j***i
发帖数: 1278
3
你哪里找的这么多题呀

Which one of the following statements about const variables is true?
a) The address of a const variable can only be assigned to a float variable.
b) A pointer to a non-const cannot be assigned the address of a const
variable.
c) A pointer to a const can be assigned to multiple objects at compile time.
d) Pointers to const objects must be initialized to NULL before they can be
referenced.
e) A pointer to a non-const cannot be assigned the address of a volatile
variable.

【在 c**********e 的大作中提到】
: Which one of the following statements about const variables is true?
: a) The address of a const variable can only be assigned to a float variable.
: b) A pointer to a non-const cannot be assigned the address of a const
: variable.
: c) A pointer to a const can be assigned to multiple objects at compile time.
: d) Pointers to const objects must be initialized to NULL before they can be
: referenced.
: e) A pointer to a non-const cannot be assigned the address of a volatile
: variable.

k*******d
发帖数: 1340
4
Seems some C++ test questions. Good for interview preparation, I think.
Many questions ask about tricky parts of C++.

variable.
time.
be

【在 j***i 的大作中提到】
: 你哪里找的这么多题呀
:
: Which one of the following statements about const variables is true?
: a) The address of a const variable can only be assigned to a float variable.
: b) A pointer to a non-const cannot be assigned the address of a const
: variable.
: c) A pointer to a const can be assigned to multiple objects at compile time.
: d) Pointers to const objects must be initialized to NULL before they can be
: referenced.
: e) A pointer to a non-const cannot be assigned the address of a volatile

1 (共1页)
进入Programming版参与讨论
相关主题
最新某公司onsite面试题 (转载)谁给解释一下这个c question
请教两道linux面试题目a pointer to a const addr
c++ 弱问题:static const char* const 这两个const 分别是什么意思?请教大家一道C的面试题
为啥允许这样的const设计一个简单的小问题
问一个 char * 和 char [] 的问题a simple C++ question
Go adopts JavaScript’s idea of semicolon insertiona question about const reference
why int** cannot convert to const int** ?请问一个关于 cost of pointer的问题
Help with a c++ const variable请教一个const pointer的问题
相关话题的讨论汇总
话题: const话题: variable话题: pointer话题: assigned话题: address