Tab positions are 'pre-set' so if a column is not wide enough to accommodate a particular entry then a tab position is missed and the next one is used.
Change 'Years' to 'Year' and you'll see the difference.
You are better off using <iomanip> and setw() functionality.
Yes got it. But can you please explain in detail (or give a link) why such a thing happens. Also I want equal spacing. But if i give the following command, I got less space between "Rate of" and "Initial Amount" as compared to others. What should I do ?
Control of how text (including tab characters) is displayed is the job of your terminal, not of C++'s streams.
The manipulator std::setw(n) sets the field width of the following token to n fill characters - in particular, it is not a blank space n fill characters in size.