一次失败的笔试:java++c++

匿名网友 匿名网友 发布于: 2015-08-30 00:00:00
阅读 195 收藏 0 点赞 0 评论 0

今天一大早就去一个公司笔试,很随意地也没有什么太多的准备,一支笔和一张简历(今早下着大雨现打的)。
到公司时,满头尽带雨水珠,连简历都打湿了一半,难以想象待会的结局……
敲门,接待,一间房子坐几分钟,思维混沌中……
Q:
What would you say if a guy walked in for an interview without a shirt on………

and I hired him?What would you say?
如果有个人连衬衫都没穿就跑来参加面试,你会怎么想…

如果我最后还雇了这个人,你会怎么想?
A:
He must’ve had on some really nice pants.

那他穿的裤子一定十分考究



然后居然是直接来笔试,四五页,全英文。
平时就会个C,原来做的是C++还有JAVA,太复杂了,
还好没事的时候跑马关花地扫了下这些东西。
还好不是一个人去笔试,旁边有一哥们貌似技术不错,复制了点。
记忆不太好,回忆一点珍藏。


Please write a singleton class?
……………………
what’s the different between heap and stack?
……………………
Whatis assignment operator? 
Defaultassignment operator handles assigning one object to another of the same class.Member to member copy (shallow copy)
Whatis inline function??
The__inline keyword tells the compiler to substitute the code within the functiondefinition for every instance of a function call. However, substitution occursonly at the compiler’s discretion. For example, the compiler does not inline afunction if its address is taken or if it is too large to inline.
Whatis Virtual Destructor?
Usingvirtual destructors, you can destroy objects without knowing their type – thecorrect destructor for the object is invoked using the virtual functionmechanism. Note that destructors can also be declared as pure virtual functionsfor abstract classes.
ifsomeone will derive from your class, and if someone will say “newDerived”, where “Derived” is derived from your class, and ifsomeone will say delete p, where the actual object’s type is”Derived” but the pointer p’s type is your class.
Whatis multiple inheritance(virtual inheritance)? What are its advantages anddisadvantages?
MultipleInheritance is the process whereby a child can be derived from more than oneparent class. The advantage of multiple inheritance is that it allows a classto inherit the functionality of more than one base class thus allowing formodeling of complex relationships. The disadvantage of multiple inheritance isthat it can lead to a lot of confusion(ambiguity) when two base classesimplement a method with the same name.
Whatare the access privileges in C++? What is the default access level?
Theaccess privileges in C++ are private, public and protected. The default accesslevel assigned to members of a class is private. Private members of a class areaccessible only within the class and by friends of the class. Protected membersare accessible by the class itself and it’s sub-classes. Public members of a classcan be accessed by anyone.
Whatis a local class? Why can it be useful?
………………

评论列表
文章目录