由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - C++ Q 103-105 (转载)
相关主题
如何 initialize array member?What're the three types of memory allocated for C++ variables?
difference between: char** p and char*p[] ??function object VS function
也问个template 的问题(C++)问一个constructor的问题 (转载)
请教大家一道C的面试题【C++】请问这样有没有memory leak?多谢
问一个C++的问题C++要是有null object就好了
some C++ interview questionsa weak c question, how to pass an array into a function?
C++ question大家对 exception 都是怎么处理的?
[合集] Returning heavy weight object in C++ functionstatic initialization dependency c++
相关话题的讨论汇总
话题: function话题: c++话题: objects话题: when
进入Programming版参与讨论
1 (共1页)
c**********e
发帖数: 2007
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: careerchange (Stupid), 信区: JobHunting
标 题: C++ Q 103-105
发信站: BBS 未名空间站 (Fri Oct 28 23:15:10 2011, 美东)
C++ Q 103: stream manipulators
Multiple choices
Which options are true of stream manipulators?
a. To use manipulators, you need only to include iostream.h as a header in
your C++ program
b. To use manipulators, you need only to include iomanip.h in your program
c. Stream manipulators are special functions which can be included in an I/O
expression
d. endl is a stream manipulator
Answer: b, c, d
C++ Q 104: object reference
Multiple choices
Which of the following statements are correct?
a. When passing an object to a function, the object must be initialized
prior to being passed to the function argument
b. When returning objects from a function, the objects in the calling
function
must be compatible to the returned objects
c. When returning an object to a function, the object must be initialized
prior
to being passed to the function argument
d. When passing objects from a function, the objects in the calling function
must be compatible to the objects returned by the called function
Answer: a and b
C++ Q 105: function templates
Multiple choices
Identify the true statements about function templates
a. All template definitions must be preceded by the keyword 'class'
b. The code in a template changes every time the function template is
instantiated
c. Every formal parameter in the template definition must appear at least
once
in the function's parameter list
d. Formal parameter names must be unique in the parameter list of a template
function
Answer: c and d
1 (共1页)
进入Programming版参与讨论
相关主题
static initialization dependency c++问一个C++的问题
How to initialize object in constructor?some C++ interview questions
一道 memset in C++的题C++ question
return value of a python function...[合集] Returning heavy weight object in C++ function
如何 initialize array member?What're the three types of memory allocated for C++ variables?
difference between: char** p and char*p[] ??function object VS function
也问个template 的问题(C++)问一个constructor的问题 (转载)
请教大家一道C的面试题【C++】请问这样有没有memory leak?多谢
相关话题的讨论汇总
话题: function话题: c++话题: objects话题: when