Sunday, July 10, 2011

C++ Object Oriented Interviews Questions


What is pure virtual function?

A class is made abstract by declaring one or more of its virtual functions to be pure. A pure virtual function is one with an initializer of = 0 in its declaration.

Q. Write a Struct Time where integer m, h, s are its members
struct Time
{
int m;
int h;
int s;
};
how do you traverse a Btree in Backward in-order?

Process the node in the right subtree
Process the root
Process the node in the left subtree

Q. What is the two main roles of Operating System?
As a resource manager
As a virtual machine

Q. In the derived class, which data member of the base class are visible?
In the public and protected sections.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Free Samples By Mail