title: overloading inserters and strange output(for '20' and '020')
body: <p>i was learning to overload '&lt;&lt;' in a very simple program,&amp; during my study,i found the following surprising output of my program.</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;conio.h&gt;
  #include&lt;string&gt;
  
  using namespace std;
  
  class student
  {
  
  int age;
  
   public:
  student(){}
  student(int a){age=a;}
  
  friend ostream &amp;operator&lt;&lt;(ostream &amp;stream,student o); 
  };
  
   /*operator overloaded in this block*/
   ostream &amp;operator&lt;&lt;(ostream &amp;stream,student o)
  { 
  stream&lt;&lt;o.age;
  return stream;
  }
  
  int main()
  {
  student ob1(20),ob2(020);   
  cout&lt;&lt;ob1;   /*will yield 20(as desired)*/
  cout&lt;&lt;"\n"&lt;&lt;ob2;     /*yielding 16(why so)*/
      _getch();
  return 0;
   }
  </code></pre>
  
  <p>any explainations please</p>