The question mark ? (also known as interrogation point, query, or eroteme in journalism)Truss, Lynne. Eats, Shoots & Leaves, 2003. p. 139. . is a punctuation that indicates an interrogative clause or phrase in many languages. The question mark is not used for indirect questions. The question mark glyph is also often used in place of missing or unknown data. In Unicode, it is encoded at .
This earliest question mark was a decoration of one of these dots, with the "lightning flash" perhaps meant to denote intonation, and perhaps associated with early musical notation like . Another possibility is that it was originally a tilde or titlo, as in " ·~ ", one of many wavy or more or less slanted marks used in medieval texts for denoting things such as abbreviations, which would later become various diacritics or ligatures.
In the early 13th century, when the growth of communities of scholars (university) in Paris and other major cities led to an expansion and streamlining of the book-production trade,De Hamel, Christopher History of Illuminated Manuscripts, 1997 punctuation was rationalized by assigning Alcuin's stroke-over-dot specifically to interrogatives; by this time the stroke was more sharply curved and can easily be recognized as the modern question mark.
It has also been suggested that the glyph derives from the Latin quaestiō meaning "question", which was abbreviated during the Middle Ages to qo.Brewer, E. C. Dictionary of Phrase and Fable, 1870 (rev. 1894), s.v. 'Punctuation'. The lowercase q was written above the lowercase o, and this mark was transformed into the modern symbol. However, evidence of the actual use of the Q-over-o notation in medieval manuscripts is lacking; if anything, medieval forms of the upper component seem to be evolving towards the q-shape rather than away from it.
According to a 2011 discovery by a Cambridge manuscript expert, Syriac language was the first language to use a punctuation mark to indicate an interrogative sentence. The Syriac question mark has the form of a vertical double dot.
This is quite common in Spanish, where the use of bracketing question marks explicitly indicates the scope of interrogation.
A question mark may also appear immediately after questionable data, such as dates:
However, demands or requests in interrogative form sometimes use a full stop (period) rather than a question mark:
In Unicode, two encodings are available: and .
In typography, some stylistic variants and combinations are available:
Bracketed question marks can be used for rhetorical questions, for example Oh, really(?), in informal contexts such as closed captioning. For an ironic or sarcastic statement, a bracketed exclamation mark may be used: Oh, really(!).
The question mark can also be used as a meta-sign to signal uncertainty regarding what precedes it. It is usually put between brackets: (?). The uncertainty may concern either a superficial level (such as unsure spelling), or a deeper truth (real meaning).
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 , 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 on GNU Linux operating systems, it can be entered by typing the hexadecimal Unicode character (minus leading zeros) while holding down both Ctrl key and Shift key, I J mm.e.: Ctrl Shift B F. 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 Compose key ? ? yields ¿. In classic Mac OS and Mac OS X (macOS), the key combination Option key 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 .
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 domain. In C# 2.0, the ?: modifier is used to handle Nullable type and ? is the null coalescing operator. In the POSIX syntax for regular expressions, such as that 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?, and null?. Similarly, in Ruby, method names ending in eq? are used for predicates. In Swift, a type followed by ? denotes an option type; ? is also used in "optional chaining", where if an option value is nil, it ignores the following operations.
In many and other computer programs, when converting text between encodings, it may not be possible to map some characters into the target character set. In this situation it is common to replace each unmappable character with a question mark ?, inverted question mark ¿, or the Unicode replacement character, usually rendered as a white question mark in a black diamond: . 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 Office's "smart quotes".
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:
Here, a script on the page search.php on the server www.example.com is to provide a response to the query string containing the pairs query=testing and database=English.
In Scrabble, a question mark indicates a blank tile.
In linear logic, the question mark denotes one of the exponential modalities that control weakening and contraction.