Sapient Technical and HR Interview Questions



271. State whether the following statements about inheritance are True or False.
I. A public member of a class can be accessed by its own objects using the dot operator.
II. While inheriting, the private members of the base class will never become the members of its derived class.

A. True, False

B. False, True

C. True, True

D. False, False

Answer : C. True, True




272. Which of the following access specifiers is used in a class definition by default ?

A. Protected

B. Public

C. Private

D. Friends

Answer : C. Private




273. Which of the following can access private data members or member functions of a class ?

A. Any function in the program

B. All global functions in the program

C. Any member function of that class

D. Only public member functions of that class

Answer : C. Any member function of that class.




274. Which of the following concepts means wrapping up of data and functions together ?

A. Abstraction

B. Encapsulation

C. Inhertiance

D. None

Answer : B. Encapsulation




275. Which of the following statements about virtual base classes is correct ?

A. It is used to provide multiple inheritance

B. It is used to avoid multiple copies of base class in derived class

C. It is used to allow multiple copies of base class in a derived class

D. It allows private members of the base class to be inherited in the derived class

Answer : B. It is used to avoid multiple copies of base class in derived class.




276. A virtual function that has no definition within the base class is called ?

A. Pure virtual function

B. Pure static function

C. Pure Const function

D. Virtual Function

Answer : A. Pure virtual function




277. C++ supports run time polymorphism with the help of virtual functions, which is called ______ binding.

A. Dynamic

B. Runtime

C. Early binding

D. Static

Answer : A. Dynamic




278. Find the wrong statement about Abstract Class ?

A. We can’t create its objects

B. We can’t create pointers to an abstract

C. It contains at least one pure virtual function

D. We can create references to an abstract class

Answer : B. We can’t create pointers to an abstract class



279. Syntax for Pure Virtual Function is ?

A. virtual void show()==0

B. void virtual show()==0

C. virtual void show()=0

D. void virtual show()=0

Answer : D. void virtual show()=0




280. The operator when overloaded in a class ?

A. Virtual polymorphism

B. Ad-hoc polymorphism

C. Transient polymorphism

D. Pseudo polymorphism

Answer : B. Ad-hoc polymorphism




Resume Sample for Sapient Nitro Company => Click Here

Cover Letter to apply job in Sapient Nitro Company => Click Here

Interview Dress Code for Sapient Nitro Company => Click Here

HR Interview Questions for Sapient Nitro Company => Click Here

Interview Preparation - Technology wise for Sapient Nitro Company => Click Here

How to apply for Sapient Nitro Company => Click Here


Related Searches to Sapient Technical and HR Interview Questions