Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain recursion with an example.



Explain recursion with an example...

Answer / nashiinformaticssolutions

o Recursion is a technique where a function calls itself to solve smaller sub-problems.
8. def factorial(n):
9. if n == 1:
10. return 1
11. else:
12. return n * factorial(n - 1)
13. print(factorial(5)) # Output: 120

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

what is difference between kpo and it industry? that is in terms of work, package etc

0 Answers  


define profiler???

0 Answers  


how many logical drive we can form to physical device in our computer?

1 Answers   nvidia,


what is difference between input parameter and output parameter.

0 Answers   NIIT,


Even if all fields are initialized also in a program, I am getting COBOL/400 decimal data error .why is it coming?

1 Answers   Freelance,


Why data bus is bidirectional and address bus is unidirectional?

4 Answers   Infosys, Wipro,


What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?

0 Answers  


why we use abstract word in abstract window toolkit in java language.

0 Answers   Infosys,


How to call dll API sub routine in VB Form.

0 Answers  


I would like to know what is Intellimatch and some interview questions which could be asked related to Intellimatch.

3 Answers  


Write a shell program to test whether a given year is leap year or not ?

0 Answers   Patni,


Explain the types of operations? Draw the figure for shift and rotate operations?

0 Answers  


Categories