好文档 - 专业文书写作范文服务资料分享网站

C常见英文面试笔试题

天下 分享 时间: 加入收藏 我要投稿 点赞

C++-常见英文面试笔试题

C/C++ Programming interview questions and answers

By Satish Shetty, July 14th, 2004What is encapsulation??

Containing and hiding information about an object, such as internal data structures and code. Encapsulation isolates(使隔离) the internal complexity of an object's operation from the rest of the application. For example, a client component asking for net revenue(收益) from a business object need not know the data's origin.

Inheritance allows one class to reuse the state

What is inheritance?

and behavior of another class. The derived class inherits

the

properties

and

method

implementations of the base class and extends it by overriding methods and adding additional properties and methods.

Polymorphism allows a client to treat different

What is Polymorphism??

objects in the same way even if they were created from different classes and exhibit(展现) different behaviors.

You can use implementation(实现) inheritance to achieve polymorphism in languages such as C++ and Java.

Base class object's pointer can invoke(调用) methods in derived class objects.

You can also achieve polymorphism in C++ by function overloading and operator overloading.

Constructor creates an object and initializes it.

What is constructor or ctor?

It also creates vtable变量列表? for virtual functions. It is different from other methods in a class.

Destructor usually deletes any extra resources

What is destructor?

allocated by the object.

Constructor with no arguments or all the

What is default constructor?

arguments has default values.

C常见英文面试笔试题

C++-常见英文面试笔试题C/C++ProgramminginterviewquestionsandanswersBySatishShetty,July14th,2004Whatisencapsulation??Containingand
推荐度:
点击下载文档文档为doc格式
977hf7d3xf2teb88j4i568ub00wtu600621
领取福利

微信扫码领取福利

微信扫码分享