What is Backslash?

What is Backslash?

The backslash \ is a symbol or typographical mark used mainly in computing and is the mirror image of the common slash /. It is sometimes called a hack, whack, escape (from C/UNIX), reverse slash, slosh, downwhack, backslant, backwhack, reverse slant, and reversed virgule.

It was initially introduced by Bob Bemer in ASCII to represent the Boolean operators AND as “/\” and OR as “\/”. In programming languages, it has different uses. In C and Perl programming languages, Ex: It is used as an escape character, to introduce special characters within Haskell, and as a line delimiter in general. In operating systems, It is used to define and separate folders and directories when writing/passing commands.

Early typewriters and computer keyboards only had a forward slash. The backward slash was not made popular until MS-DOS started being used.


How Backslash Uses in Computer

A backslash can represent a file path in MS-DOS and Windows. For example, c:\windows is an example of the backslash being used. It may also be used for any of the following reasons.

  • The backslash is used as an escape character.
  • A file and directory separator in a file path.
  • A networked computer or folder in a network path.