c**********e 发帖数: 2007 | 1 【 以下文字转载自 JobHunting 讨论区 】
发信人: careerchange (Stupid), 信区: JobHunting
标 题: C++ Q93 - Q95
发信站: BBS 未名空间站 (Fri Oct 14 23:32:57 2011, 美东)
C++ Q93: formal parameter T
What is the purpose of declaring the formal parameter T?
A. T specifies that any data sent to the function template must be of type T
B. T is a place-holder for a C++ data type
C. T can only hold a single data type int
D. T can hold any language data type
C++ Q94: Pointer
Multiple choices: Identify the true statements about the use of pointers in
C++.
A. A pointer is a variable that can contain the memory address of another
variable as its value
B. Although not necessary, pointers make the use of dynamic memory
allocation more efficient
C. You can use casting to cause a pointer of one type to reference the
memory address of a variable of another type
D. In a cout statement, you can use a pointer to display a memory address,
but not the value stored at that address
C++ Q95: Files and Streams
Multiple choice: Which of the following statements are true about writing an
integer to a file?
A. The write() function must know the exact location of the integer and the
address operator (&) enables it to locate it
B. The write() function must know the size of the integer and the address
operator (&) returns the amount of storage needed for it
C. The write() function must know the exact location of the integer and the
sizeof operator enables it to locate it
D. The write() function must know the size of the integer and the sizeof
operator enables it to locate it |
|