Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Question mark
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Computing== In [[computing]], the question mark [[Character (computing)|character]] is represented by [[ASCII]] code 63 (0x3F hexadecimal), and is located at Unicode code-point {{unichar|003F|QUESTION MARK|html=}}. The full-width (double-byte) equivalent ('''?'''), is located at code-point {{unichar|FF1F|FULLWIDTH QUESTION MARK|html=}}.<ref>{{cite web |title=Character Codes – HTML Codes, Hexadecimal Codes & HTML Names |url=http://www.character-code.com/ |work=Character-Code.com |access-date=August 7, 2016 |archive-date=August 7, 2016 |archive-url=https://web.archive.org/web/20160807130637/http://www.character-code.com/ |url-status=live}}</ref> The [[Inverted question mark and exclamation point|inverted question mark]] ('''¿''') corresponds to Unicode code-point {{unichar|00BF|INVERTED QUESTION MARK|html=}}, and can be accessed from the keyboard in [[Microsoft Windows]] on the default US layout by holding down the [[Alt key|<kbd>Alt</kbd>]] and typing either <kbd>1 6 8</kbd> (ANSI) or <kbd>0 1 9 1</kbd> (Unicode) on the numeric keypad. In [[GNOME]] applications on [[Linux]] operating systems, it can be entered by typing the hexadecimal Unicode character (minus leading zeros) while holding down both [[Ctrl key|<kbd>Ctrl</kbd>]] and [[Shift key|<kbd>Shift</kbd>]], i.e.: <kbd>Ctrl Shift B F</kbd>. In recent [[XFree86]] and [[X.Org Server|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|<kbd>Compose</kbd>]]<kbd> ? ?</kbd> yields <samp>¿</samp>. In [[classic Mac OS]] and [[Mac OS X]] (macOS), the key combination [[Option key|<kbd>Option</kbd>]]<kbd> Shift ?</kbd> produces an inverted question mark. In shell and scripting languages, 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 (computer science)|string]]. In particular, [[glob (programming)|filename globbing]] uses "?" as a substitute for any one character, as opposed to the [[asterisk]], "*", which matches zero or more characters in a string. The question mark is used in ASCII renderings of the [[International Phonetic Alphabet]], such as [[SAMPA]], in place of the [[glottal stop]] symbol, {{IPA|'''ʔ'''}}, (which resembles "'''?'''" without the dot), and corresponds to Unicode code point {{unichar|0294|LATIN LETTER GLOTTAL STOP|html=}}. In [[computer programming]], the symbol "'''?'''" has a special meaning in many [[programming language]]s. In [[C (programming language)|C]]-descended languages, <code>?</code> is part of the [[?:|<code>?:</code>]] operator, which is used to evaluate simple [[Boolean domain|boolean conditions]]. In [[C Sharp (programming language)|C#]] 2.0, the <code>?</code> modifier is used to handle [[Nullable type|nullable data types]] and <code>??</code> is the [[null coalescing operator]]. In the [[POSIX]] syntax for [[regular expression]]s, such as that used in [[Perl]] and [[Python (programming language)|Python]], <code>?</code> stands for "zero or one instance of the previous subexpression", i.e. an optional element. It can also make a quantifier like <code>{x,y}</code>, <code>+</code> or <code>*</code> match as few characters as possible, making it lazy, e.g. <code lang="js">/^.*?px/</code> will match the substring <code>165px</code> in <code>165px 17px</code> instead of matching <code>165px 17px</code>.{{efn|The [[Perl Compatible Regular Expressions]] library implements the <code>U</code> flag, which reverses behavior of quantifiers: these become lazy by default, and <code>?</code> can make them greedy.|name="pcre-qm-Uflag"}} In certain implementations of the [[BASIC]] programming language, the <code>?</code> character may be used as a shorthand for the "print" function; in others (notably the [[BBC BASIC]] family), <code>?</code> is used to address a single-byte memory location. In [[OCaml]], the question mark precedes the label for an optional parameter. In [[Scheme (programming language)|Scheme]], as a convention, symbol names ending in <code>?</code> are used for predicates, such as <code>odd?</code>, <code>null?</code>, and <code>eq?</code>. Similarly, in [[Ruby (programming language)|Ruby]], method names ending in <code>?</code> are used for predicates. In [[Swift (programming language)|Swift]] a type followed by <code>?</code> denotes an [[option type]]; <code>?</code> is also used in "optional chaining", where if an option value is nil, it ignores the following operations. Similarly, in [[Kotlin (programming language)|Kotlin]], a type followed by <code>?</code> is [[Nullable type|nullable]] and functions similar to option chaining are supported. In [[APL (programming language)|APL]], <code>?</code> generates random numbers or a random subset of indices. In [[Rust (programming language)|Rust]], a <code>?</code> suffix on a function or method call indicates error handling. In [[SPARQL]], the question mark is used to introduce variable names, such as <code>?name</code>. In [[MUMPS]], it is the pattern match operator. In the [[Xbase]] family of programming languages, which includes [[dBase]] and [[FoxPro]], either one or two question marks at the start of a line of code serve as a shorthand for the Print function. The effect is to evaluate the following expression(s) and to send the result(s) either to the screen or a printer. A single question mark sends a carriage return and line feed before the output; this is not the case with a double question mark.<ref>{{cite web |title=The Xbase++ Reference Documentation |url=https://doc.alaska-software.com/ |website=Alaska Software |access-date=23 March 2025}}</ref><ref>{{cite web |title=Visual FoxPro Reference |url=https://hackfox.github.io/section4/ |website=Hacker’s Guide to Visual FoxPro |publisher=Hentzenwerke Publishing |access-date=23 March 2025}}</ref> In many [[Web browser]]s 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 <samp>?</samp>, inverted question mark <samp>¿</samp>, or the Unicode [[replacement character]], usually rendered as a white question mark in a black diamond: {{unichar|FFFD|REPLACEMENT CHARACTER}}. 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 [[Quotation marks in English#Smart quotes|"smart quotes"]]. The generic [[Uniform Resource Locator|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, <code>?</code>, 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, <code>&</code>, as seen in this URL: <code><nowiki>http://www.example.com/search.php?query=testing&database=English</nowiki></code> Here, a script on the page <samp>search.php</samp> on the server <samp>www.example.com</samp> is to provide a response to the query string containing the pairs <samp>query=</samp><kbd>testing</kbd> and <samp>database=</samp><kbd>English</kbd>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)