文本描述
微软2013暑假实习生笔试题
1. Which of the following calling convention(s) support(s) supportvariable-length
parameter(e.g. printf)?(3 Points)
? ??A. cdecl?? ?
? ? B. stdcall ? ?
? ? C. pascal ? ?
? ? D. fastcall
2. What's the output of the
following code?(3 Points)
[cpp]?view plaincopy
class?A??
{??
public:??
????virtual?void?f()??
????{??
????????cout<<"A::f()
"<<endl;??
????}??
????void?f()?const??
????{??
????????cout<<"A::f()?const"<<endl;??
????}??
};??
??
class?B:?public?A??
{??
public:??
????void?f()??
????{??
????????cout<<"B::f()"<<endl;??
????}??
????void?f
()?const??
????{??
????????cout<<"B::f()?const"<<endl;??
????}??
};??
??
void?g(const?A*?a)??
{??
????a->f
();??
}??
??
int?main()??
{??
????A*?a?=?new?B();??
????a->f();??
????g(a);??
????delete?a?;??
}??
? ? A. B::f()B::f()const
? ?
? ??B. B::f()A::f()const???
? ? C. A::f()B::f()const ? ?
? ? D.?A::f()A::f()const?
3. What is the difference between a linked list and an
array?(3 Points)
? ??。。。。。。以下内容略