fos4cdt is an Eclipse plugin to format C/C++ source files on any save action.
When you press Ctrl+S or click Save button, the plugin formats saved files automatically.
You can enable/disable auto formatting by a preference page and using shortcut keys.
The plugin is tested with Eclipse Indigo
Open "Install New Sofware" window in your Eclipse.
Add https://sourceforge.net/projects/fos4cdt/files/update_site/ to online repositories.
Uncheck "Group items by category" if you don't see any features.
Next and Finish!
Download update site from https://sourceforge.net/projects/fos4cdt/files/latest/download link.
Unpack update site folder
Add it to Eclipse local repositories.
Install the plugin as mentioned above.
Simply save C/C++ files. You'll see that they would be formatted automatically.
If you disable this feature press Alt+Shift+F12. To enable again press Alt+Shift+F11. Also you can use the preference page under C/C++ node.