# Which of the following are available only in the class hierarchy chain ?

Answer : C. Protected data members

Which of the following are available only in the class hierarchy chain ?

A. Public data members

B. Private data members

C. Protected data members

D. Member functions

## Explanation :

• Public – The members declared as Public are accessible from outside the Class through an object of the class.
• Protected – The members declared as Protected are accessible from outside the class but only in a class derived from it.
• Private – These members are only accessible from within the class. No outside Access is allowed.
• Member Function – Member functions are the functions, which have their declaration inside the class definition and works on the data members of the class. The definition of member functions can be inside or outside the definition of class.

## What is space complexity of the program ?

Answer : C. Amount of memory required by the program to run

## Here is an infix notation: ((A+B)*C-(D-E))^(F+G) Choose the correct postfix notation of the above from the given options ?

Answer : B. AB+C*DE–FG+^

## Given : integer x = 40, y = 35, z = 20, w = 10. Comment about the output of the following two statements ? print x * y / z – w print x * y / (z – w)

Answer : A. Differ by 80

## What is the time complexity of adding three matrices of size NXN cell-by-cell ?

Answer : B. O(N2)

## I have a problem to solve that takes n as an input number. The problem has a property that given the solution for (n-1) ? I can easily solve the problem for n. Which programming technique will I use to solve such a problem ?

Answer : D. Recursion

Answer : B. 1