Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    You are not calling function(20), function(19), ... as you are expecting, but function(20), function(20), function(20), .... Add print statements to check that if you want to be sure, or look at the definition of the post decrement operator. Commented Jan 15, 2016 at 9:55
  • Search for "tail call optimization". Commented Jan 15, 2016 at 9:55
  • were you by chance blocked at Stack Overflow for trying to use word 'problem' in question title? Commented Jan 15, 2016 at 9:56
  • @KilianFoth thanx a lot......now i can proceed without crasing my app Commented Jan 15, 2016 at 9:59
  • @KilianFoth "Each function call will use some memory and if the data is big it will throw StackOverflowException.", I think you skimmed over this Commented Jan 15, 2016 at 10:17