title: Using various format specifiers of c in c++
body: <p>As in c we can use various format specifiers like </p>
  
  <ul>
  <li><strong>%nd</strong> where n is a number, to print the number with a total of atleast n space covered</li>
  <li><strong>%0nd</strong> same as above, except pre-padding with 0's   <strong>" %05d ",3 => 00003</strong></li>
  <li><strong>%.nf</strong> to set precision of n after decimal</li>
  <li>etc ....</li>
  </ul>
  
  <p>So is there any way to use these with <strong>std::cout</strong> ?</p>
  
  <p>I got some negative feedback in a recent course (c++ for c programmers) in coursera, for using <strong>printf</strong> instead of <strong>cout</strong> because i wanted to some formatting :(</p>