Question Mark - Computing

Computing

In computing, the question mark character is represented by ASCII code 63 (0x3F hexadecimal), and is located at Unicode code-point U+003F. The full-width (double-byte) equivalent, , is located at Unicode code point U+FF1F.

The question mark is often utilized as a wildcard character: a symbol that can be used to substitute for any other character or characters in a string. In particular "?" is used as a substitute for any one character as opposed to the asterisk, "*", which can be used as a substitute for zero or more characters in a string. The inverted question mark (¿) corresponds to Unicode code-point 191 (U+00BF), and can be accessed from the keyboard in Microsoft Windows on the default US layout by holding down the Alt key and typing either 1 6 8 (ANSI) or 0 1 9 1 (Unicode) on the numeric keypad. In GNOME applications, it can be entered by typing the hexadecimal Unicode character while holding down both ctrl and shift, i.e.: ctrl+shift+BF. In recent XFree86 and X.Org incarnations of the X Window System, it can be accessed as a compose sequence of two straight question marks, i.e. pressing ? ? yields ¿. In the Mac OS, option+shift+? produces an inverted question mark.

The question mark is used in ASCII renderings of the International Phonetic Alphabet, such as SAMPA in place of the glottal stop symbol, ʔ, (which resembles "?" without the dot), and corresponds to Unicode code point U+0294, Latin letter glottal stop.

In computer programming, the symbol "?" has a special meaning in many programming languages. In C-descended languages, "?" is part of the ?: operator, which is used to evaluate simple boolean conditions. In C# 2.0, the "?" modifier and the "??" operator are used to handle nullable data types. In the POSIX syntax for regular expressions, such as the one used in Perl and Python, ? stands for "zero or one instance of the previous subexpression", i.e. an optional element. In certain implementations of the BASIC programming language, the "?" character may be used as a shorthand for the "print" function; in others (notably the BBC BASIC family), "?" is used to address a single-byte memory location. In OCaml, the question mark precedes the label for an optional parameter. In Scheme, as a convention, symbol names ending in ? are used for predicates such as odd?, null?, and eq?. Similarly, in Ruby, method names ending in ? are used for predicates.

In many web browsers and other computer programs, "?" is used to show a character not found in the program's character set. This commonly occurs for apostrophes and quotation marks when they are written with software that uses its own proprietary non-standard code for these characters, such as Microsoft's Smart Quotes. Some fonts will instead use the Unicode Replacement Glyph (U+FFFD, �), which is commonly rendered as a white question mark in a black diamond (see replacement character).

The generic URL syntax allows for a query string to be appended to a resource location in a web address so that additional information can be passed to a script; the query mark, ?, is used to indicate the start of a query string. A query string is usually made up of a number of different field/value pairs, each separated by the ampersand symbol, &, as seen in this URL:

http://www.example.com/login.php?username=test&password=blank

Here, a script on the page login.php on the server www.example.com is to provide a response to the query string containing the pairs "username"-"test" and "password"-"blank".

Read more about this topic:  Question Mark