how is this program printing in reverse direction? : <p>output : 123456789987654321
I understand 123456789 but how its printing 987654321</p>

<pre><code>    #include &lt;iostream&gt;

    using namespace std;

    void printNum ( int num )
    {
        cout &lt;&lt; num;
        if ( num &lt; 9 )
        {
            printNum ( num + 1 );
        }
        cout &lt;&lt; num;
    }

    int main()
    {
        printNum ( 1 );
    }
</code></pre>
