Mastek C++ Interview Questions

1. Which of the following statements are true?
a) Destructors can have arguments.
b) Destructors can be overloaded.
c) Constructor can be of the same name
d) There can only be one destructor per class

2. Can friend functions be called using pointer to pointer functions?

a) Yes b) No c) May be d) None of these

3. What is the default access specifier for an inheritance?
a) Private b) Public c) Structure d) class

4. How many types of inheritances are there?

5. Which inheritance method is most efficient?

a) Hierarchical b) Multiple c) Multilevel d) Simple

6. Write a program to find out the prime numbers from1 to 100?

7. What are servlets?

8. What is the function of RMI?

9. What is method overloading?

Shared by: Susant Kumar