SAP Labs Aptitude Questions and Answers for Freshers
1 / 27
Inheritance is the principle that
Aclasses with the same name must be derived from one another
Bknowledge of a genral category can be applied to more specific objects
CC++ functions may be used only if they have logical predecessors
Done function name may invoke different methods
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
2 / 27
What is the syntax of inheritance of class?
Aclass name
Bclass name : access specifer
Cclass name : access specifer class name
DNone of these
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
3 / 27
What is meant by containership?
Aclass contains objects of other class types as its members
Bclass contains objects of other class types as its objects
Cboth a & b
DNone of these
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
4 / 27
class derived: public base1, public base2 { } is an example of
APolymorphic inheritance
BMultilevel inheritance
CHierarchical inheritance
DMultiple inheritance
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
5 / 27
What is the difference between public and private inheritance?
AUnder public inheritance, public and protected members of the base class have their same status in the derived class
BUnder private inheritance, public and protected members of the base class all become private members of the derived class.
CBoth A & B
DNone of these
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
6 / 27
Syntax for Pure Virtual Function is ______________ .
Avirtual void show()==0
Bvoid virtual show()==0
Cvirtual void show()=0
Dvoid virtual show()=0
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
7 / 27
A virtual function that has no definition within the base class is called____________.
APure virtual function
BPure static function
CPure Const function
DFriend function
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
8 / 27
Which is called on allocating the memory for array of objects?
Adestructor
Bconstructor
Cmethod
DNone of the mentioned
Answer: Option B
Explanation:When you allocate memory for an array of objects, the default constructor must be called to construct each object. If no default constructor exists, you are stuck needing a list of pointers to objects.
Submit Your Solution
9 / 27
Can a class have virtual destructor?
AYes
BNo
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
10 / 27
If the copy constructor receives its arguments by value, the copy constructor would
Acall one-argument constructor of the class
Bwork without any problem
Ccall itself recursively
Dcall zero-argument constructor
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
Here is the list of questions asked in SAP Labs Aptitude Questions and Answers for Freshers - Q4Interview. Practice SAP Labs Written Test Papers with Solutions and take Q4Interview SAP Labs Online Test Questions to crack SAP Labs written round test. Overall the level of the SAP Labs Online Assessment Test is moderate. Only those candidates who clear the written exam will qualify for the next round, so practic all the questions here and take all the free tests before going for final selection process of SAP Labs