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

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 ?

A. Iteration

B. Decision-making

C. Object Oriented Programming

D. Recursion

## Explanation

Recursion(the repeated application of a recursive procedure) solve the problem has a property that given the solution for (n-1).

## What is space complexity of the program ?

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

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

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

Answer : A. Using access specifier