title: Is there a default return value of C++ functions?
body: <p>I am surprised that a file containing the following lines of code is successfully compiled and linker produces an executable. I thought that all functions, except <code>main</code>, must have a valid <code>return</code> statement unless the return type is <code>void</code>.</p>
  
  <pre><code>int foo(){}
  double bar(){}
  int main(){}
  </code></pre>
  
  <p>What am I missing?</p>