Okay, i'm reading book jumping into c++ and i've made it to chapter 16 successfully which is about recursion. I read the chapter and watched few youtube videos so i guess i know how they work. But when i tried to understand this code given in book, i failed.
According to my understanding this code **should print 1234567899**. I have commented the lines/section which im unable to understand.
Please be very descriptive when explaining as I want to clear my doubts completely.

```
#include <iostream>

using namespace std;

void printNum (int num)
{

    cout << num ;

    if ( num < 9 )
    {
        printNum( num + 1 ); //if statement should continue untill 123456789 prints on screen
    }
    cout << num; // this should print only 9 and after that program should exit.
}
int main ()
{
    printNum( 1 );
}

```