title: Why functionss work perfectly good without return at the end
body: <p>I have a question related to function without return statement at the end of definition. How it works? It can return something becouse the value to return is allocated on the stack with random number when we call the func? Check the example below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int fun1(){
      cout &lt;&lt; "Fun1" &lt;&lt; endl;
  }
  
  char fun2(){
      cout &lt;&lt; "Fun2" &lt;&lt; endl;
  }
  
  short fun3(){
      cout &lt;&lt; "Fun3" &lt;&lt; endl;
  }
  
  float fun4(){
      cout &lt;&lt; "Fun4" &lt;&lt; endl;
  }
  
  double fun5(){
      cout &lt;&lt; "Fun5" &lt;&lt; endl;
  }
  
  int main()
  {
  
     cout &lt;&lt; fun1() &lt;&lt; " " &lt;&lt; endl;
     cout &lt;&lt; fun2() &lt;&lt; " " &lt;&lt; endl;
     cout &lt;&lt; fun3() &lt;&lt; " " &lt;&lt; endl;
     cout &lt;&lt; fun4() &lt;&lt; " " &lt;&lt; endl;
     cout &lt;&lt; fun5() &lt;&lt; " " &lt;&lt; endl;
  }
  </code></pre>