CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Posts
    3

    Please help newbe with simple algo

    Can u tell me when will the end of a program is call if in the middle of the program I will call recursively ???
    Bablo!

  2. #2
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+) Ejaz has a reputation beyond repute (3000+)
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

    Re: Please help newbe with simple algo

    I'm sorry to say that I didn't understand you. Please elaborate.

  3. #3
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,716

    Thumbs up Re: Please help newbe with simple algo

    Quote Originally Posted by Bablo
    Can u tell me when will the end of a program is call if in the middle of the program I will call recursively ???
    Bablo!
    Recusrsive Program Termonate When the Condition Fail.
    In the Mid Reason of Termination can be Wrong Condition.Out of Scope or Some Exceptional Error.that's all

    like
    Code:
    if(i==0)
    return 0;
    else 
    return (i*func(i-1));

    when condition of i==0 your Function terminate at this point

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width