Special characters and Symbols in Programming Languages

A special character is a character that is not an alphabetic or numeric character. Punctuation marks and other symbols are examples of special characters. Unlike alphanumeric characters, special characters may have multiple uses.

Special characters and symbols have importance in many programming languages like the execution of the database query, commenting, syntax writing, writing codes, executions of code blocks, mathematical logic implementation in codes, and many more.

CharacterPronounceWhere it used
~TildeShorten long file names.In regular expressions used for pattern matching.a tilde and a dollar sign is a temporary file.home directory on a Linux computer.the ~ represents a bitwise NOT.
`Grave accentthe backtick can be used for command substitution. the back quote is sometimes used to emphasize code contained in the comment.
!Exclamation pointIn programming and scripting languages, the exclamation mark is used as “not.” A shebang to help scripts, such as Perl scripts, to identify the location of Perl. Used to help identify a nonexecutable statement.
@AmpersatE-mail address.Array in computer programming.A short way of saying “at” in chat or a text message.In a batch file to not echo to the screen.Placing the @ symbol in front of a username on Twitter directs the tweet to that user.
#OctothorpeIn hashtags. In programming to identify a nonexecutable statement. In IRC chat an identifier of a channel.
$Dollar signIn computer programming languages, the dollar sign has a wide variety of uses. In languages like BASIC, Pascal, and PHP, the dollar sign defines variables and constants. ALGOL 68 and TeX typesetting languages use the dollar sign for delimiting transput format and mathematical regions. ASP.NET uses the dollar sign to indicate an expression.
%Percent signUsing a % as a wildcard in a database. Represent matched text. In programming languages like Perl, a % is used for a hash. In Python, the % is an operator that returns the remainder of a number. In Microsoft Windows, a percent is used for an environment variable.
^Circumflex, caretCarets can be used in computer programming languages for various reasons. Many programs that support regular expressions (regex) use ^ to match the first character in a line or string.
&AmpersandUsed in programming languages, including Visual Basic (to combine variables and literal text), C++ (denoting an address in memory) and Perl (to call a user-defined subroutine). It can also be used in Excel spreadsheet formulas to combine several values (cells) into a single value (cell) and in HTML for extended HTML characters.
*AsteriskAn asterisk in a math formula. In the PHP code, the comment “hidden text” would not show when executed because it is surrounded by a forward slash and an asterisk.The asterisk represents a wildcard or wild character with computers.
(Open parenthesisIn many computer programming languages, parentheses have a special purpose.In regular expressions, parentheses are used for pattern grouping and capturing.
)Close parenthesisIn many computer programming languages, parentheses have a special purpose.In regular expressions, parentheses are used for pattern grouping and capturing.
_UnderscoreThe underscore is commonly used as an alternative to the space key when a space is not allowed.It is not uncommon to use an underscore in a file name in place of a space, especially on the Internet.
Hyphen, dashThe hyphen is commonly used in programming and mathematics to subtract one number from another.A minus symbol or a horizontal line is a symbol used as an indication for a decrease, remove, move up, or zoom out on software programs and hardware devices.
+Plus signThe plus key is most often used in programming and mathematics to add two or more numbers or as a programming operator.Two pluses next to each other in programming is a shorthand method of incrementing a variables value.
=Equal signIn programming languages, the equal symbol is also an operator in a conditional statement. With computers, the equals sign is commonly used in programming and mathematics to show a total value or assign a value.In Microsoft Excel and other spreadsheet programs, all formulas begin with the equal sign.
{Open braceThese keys are most commonly used in curly bracket programming languages such as C, Java, Perl, and PHP to enclose groups of statements or for a block of code.
}Close braceThese keys are most commonly used in curly bracket programming languages such as C, Java, Perl, and PHP to enclose groups of statements or for a block of code.
[Open bracketRegular expressions, wildcards, SQL, Visual Basic, C#, and JavaScript programming languages to enclose characters for string validation, pattern matching, or build arrays.In JavaScript programming bracket. In SQL programming bracket.
]Close bracketRegular expressions, wildcards, SQL, Visual Basic, C#, and JavaScript programming languages to enclose characters for string validation, pattern matching, or build arrays.In JavaScript programming bracket. In SQL programming bracket.
|Vertical barIn programming, the double pipe “||” is used to represent an OR boolean operator.
\BackslashThe 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.
:ColonA colon in front or end of a word (depending on programming language) creates a label that can be used with a goto.In a URL, a colon separates the protocol with the address.In MS-DOS and the Windows command line, a colon indicates a drive letter.In a spreadsheet formula, a colon specifies a range.
;SemicolonThe semicolon is used in many computer programming to finish an instruction.A semicolon may also be used as a delimiter to separate text.Other programming languages like AutoHotkey use a semicolon for non executable statements.
Double quotation markIn computer programming, quotes contain text or other data.If surrounded by a single quote instead of a double quote, the string is treated as a literal string in many languages.In a command line to recognize files or directories with spaces, they must be surrounded by quotes.Quotes are an integral part of the HTML language. Consequently, to write a quote that is not part of an HTML tag, you need to use the " special character.Quotes are also an important part of what makes other scripting and programming languages. To print the quotation mark symbols as output, you need to escape the quote.
Single quotation mark, apostropheIn most computer programming, single quotes are commonly used to contain commands or literal strings.In other programming languages, like QBasic and Visual Basic, the single quote is treated as a nonexecutable statement.In Microsoft Excel, an apostrophe causes Excel to treat the text entered into a cell after the apostrophe as text instead of a number.
<Open angle bracket, less than symbolLess than could be used in computer programming.The less than symbol resembles an arrow pointing to the left and is commonly used in math and computer programming.Symbol is used to create HTML tags, it cannot be used in text without causing errors. To create a less than in HTML use either the entity number &#60; or entity name &lt; in your code.When working with negative numbers, the negative number farthest away from zero is less than the other negative number.
>Close angle bracket, greater than symbolGreater than symbol could be used in computer programming. With a markup language, like HTML, the greater than symbol is used to close a tag.Greater than symbol is used to end HTML tags, it cannot be used in text without causing errors. To create a greater than symbol in HTML, use either the encoded entity number &#62; or entity name &gt; in your code.
,CommaThe comma is used in programming as an operator to separate values or elements.When dealing with numbers, in a calculator, or programs like Microsoft Excel, a comma style is setting that group’s numbers.When writing out the date with the month, date, and year the comma is used to separate the date from the year.
.PeriodIt is used as or part of a wildcard in programming code.Two periods can be used with the cd command in the Windows command line and Linux to move back one directory.The period is used to help create a URL and break up important portions of the URL.
?Question markThe question mark can be used as a wildcard character, a substitute for any one character.MS-DOS commands the question mark can be used as a part of a switch to display the help for any command.Some programming languages, such as C#, POSIX, Perl, Python, BASIC, and Ruby utilize the question mark for various functions.
/Forward slashForward slash is in the nonexecutable statement used with some programming languages. HTML, XML, and other markup languages, the forward slash is used with closing tags to let the browser or reader know when a tag ends.

Happy Exploring Special Characters 🙂


Discover more from mycodetips

Subscribe to get the latest posts sent to your email.

Discover more from mycodetips

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top