title: Is a function terminates as soon as it returns a value, ignoring its next lines?
body: <p>What value the <code>return_a_number</code> function returns in following case:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;conio.h&gt;
  
  using namespace std;
  
  int return_a_number(int n)
  {
   if(n &lt; 0) return -1;
  
   return 1;
  }
  
  int main()
  {
   cout &lt;&lt; &quot;Enter any number: &quot;;
   cin &gt;&gt; num;
   cout &lt;&lt; return_a_number(num);
    
   getch();
   return 0;
  }
  
  </code></pre>
  <p>As <code>return 1</code> is the last statement of function, Is it returns 1 everytime?</p>
  <p>I'm new in c++. So I've many confusions.</p>