Use of Backslash "\n" in C language

 Why Backslash "n" is used in "printf" in machine languages

Answer:

  • Backslash "\n" is used in many programming languages.
  • It is called as newline character.
  • We use Backslash "\n" to bring a newline in our output.
  • This newline character is a type of escape sequence.
  • This helps the programmer or the coder to display the output with an alignment .
  • It also help others to see and understand  the output clearly.
  • The Backslash "\n" is used only in "printf" statements
  • There are also other escape sequence characters like "\t".
  • "\t" is use for tab space.
  • It is also a escape sequence.
  • This helps the programmer to leave space between things 
  • And it helps the programmer as well the user to understand the output more clearly.

For example: Time Table (ayyavuu.blogspot.com)


Click the above example link to see an example program and output to get  a clear idea above the newline character and tab space character.


Comments

Popular posts from this blog

COHESION AND COUPLING material

Coding and Testing in software engineering