Why is a backslash as an escape character instead of a less used character?

In C / C ++ (and other languages), an escape character is a backslash. But backslashes are popular (in paths / regexes). Why not less popular character, for example tilde (~) or exponent (^)?

+4
source share
1 answer

The question should be the other way around: why was the backslash, which until the beginning of the 1980s was mainly used for escape characters, chosen as the path separator in MS-DOS? See this blog post for an answer.

+8
source

Source: https://habr.com/ru/post/1395958/


All Articles