Beautify your c or cpp program using Linux indent command
Beautify your c or cpp program using Linux indent command. When we write lengthy programs, indenting the code increases the readability of code. Indenting also makes easy to maintain lengthy codes. Linux provides an utility known as “indent” command. The indent command takes input code and formats/beautify codes in well readable format.
How to install indent
On Ubuntu based distribution or Debian based Linux Os you can install indent by “sudo apt-get install indent” command from Linux terminal. On RedHat or Cent Os we can install indent by “yum install indent”.
How to beautify code using indent command
Steps for code indenting
- Open Linux terminal
- Run command indent main.c
- The same file main.c will be modified.