# 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

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) ?

A. Differ by 80

B. Same

C. Differ by 50

D. Differ by 160

## Explanation :

print x * y / z – w = 40 * 35 / 20 – 10 = 60
print x * y / (z – w) = 40 * 35 / ( 20 – 10 ) = 140
Difference is 80

## 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+^

## 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

## Which of the following cannot be inherited ?

Answer : C. Destructor

## How will a class protect the code inside it ?

Answer : A. Using access specifier