0
int main()
{  
     recurse(5,3);
     return 0;
} // end main
void recurse(int x, int y)
{     if (y > 0)
     {     ++x;
            --y;
            cout <<  x << " " <<  y  << endl;  
            recurse(x, y);
            cout <<  x << " " <<  y << endl;  
      }  // end if
}  // end recurse

What is the output?

Edited by mike_2000_17: Fixed formatting

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Salem
0

Again use CODE TAGS...arghhh

>>What is the output?

The output is either compile time errors, or a stack overflow in your "recurse" function.

0

Again use CODE TAGS...arghhh

>>What is the output?

The output is either compile time errors, or a stack overflow in your "recurse" function.

What is wrong or missing?

0

What is the output?

What stops you from building and running this?

or a stack overflow in your "recurse" function.

What makes you think so?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.