What Is Backslash (Computing)?

Backslash is a character heavily used in computing and created by Bob Bemer in 1960. The backslash is a very popular character also used in different areas and called backward slash, downward slash, reverse solidus, etc. The backslash is depicted as \. The backslash is created after the forward-slash and became popular with the popularity of the Microsoft MS-DOS operating systems.

Backslash On Keyboard

A character backslash can be located in different locations of a keyboard which is mainly related to the keyboard language and culture. For example for US-based keyboards for different variations, the backslash is located above the SHIFT key and between " and Enter keys.

Why Use Backslash?

Backslash can be used in different applications for different purposes.One of the most popular usecase is the MS-DOS and windows. Backslash is used in windows to delimit different directories and files. In the following example backslash is used to specify the path of directories and files.

C:\Program Files\Microsoft\Internet Explorer

In this example, the backslash is used to provides directories and partition C: , Program Files , Microsoft , Internet Explorer .

A backslash can be also used to specify a network share or resource location in SMB. The first two backslashes are used to start the resource location and specify the host via the IP address or hostname. In the following example, the resource or share is located on the dc.poftut.com in the directory named Public .


Backslash also used for different programming language for different reasons. In C, C++, PHP, C#, Java double backslash is used to create single line comment like below.

\\ This is a comment.

Most of the modern programming languages also use single slash with the n character \n to define a new line.

LEARN MORE  What Is Peripheral Device (Types, and List Of Peripheral Devices)?

Leave a Comment