Skip to main content

Command Palette

Search for a command to run...

Learning C Language: Day 2 Instructions

Understanding White Space in C Language

Published
2 min read

Token are usually separated by white space which can be one or more

  • Blank's

  • Tabs

  • Newline

  • Form Feed

  • Comments

  1. Blank's :-

A blank space refers to the regular space character that you type using the space bar. It is represented by the character ' '. If you want to check whether a character is a space, you can use the ' ' character directly.

  1. Tabs :-

The tab character (\t) is an escape sequence that represents a horizontal tab. When encountered in a string, it causes the cursor to move to the next horizontal tab stop.

  1. New line :-

In C programming, you can create a new line by using the newline character \n within a string.

  1. Form feed :-

In C programming, the form feed character (often represented as 'f') is an ASCII control character that serves as a page break. When encountered, it instructs the printer to eject the current page and continue printing at the top of another page.

  1. Comments :-

comments are text ignored by complier comments are useful for documentation of your code useful programme

There are two types of comments

  • Single line comments

  • Multi line comments

    1. Single line comments :-

In C programming, a single-line comment starts with // and extends to the end of the line. These comments are completely ignored by the compiler during compilation.

  1. Multi line comments :-

In C programming, you can use multi-line comments to add explanatory text that spans multiple lines. These comments are ignored by the compiler and are useful for documenting your code.