Back
Asciify Logo
Asciify

Question Mark

? (Question Mark) is ASCII code point 63 (0x3F), Unicode U+003F, and a printable punctuation character. It turns a statement into a question — a single glyph that reverses the entire force of a sentence, transforming a declaration into a request for information. Programming has found remarkably varied uses for this character. The ternary operator condition ? a : b appears across C, Java, JavaScript, and dozens of other languages, offering a compact if-else in expression form. In URLs, ? marks the boundary between the path and the query string (/search?q=hello), a separator so fundamental to the web that every form submission depends on it. SQL uses ? as a placeholder in parameterized queries, and regular expressions make it the "zero or one" quantifier — colou?r matches both "color" and "colour." More recently, Swift, Kotlin, TypeScript, and C# use ? for optional chaining and nullability: user?.address?.city short-circuits to null if any link in the chain is missing. The gotcha lives in regex greediness: appending ? after a quantifier like * or + switches it from greedy to lazy matching, so .*? and .* can return dramatically different results on identical input, and choosing the wrong one produces matches that are either too short or too long with no error to signal the mistake. The mark may descend from the Latin word "quaestio" (question), which medieval scribes abbreviated as "qo" stacked vertically — the q gradually stylized into the curve and the o shrinking to the dot below. UTF-8 encodes it as a single byte 0x3F. Unicode classifies it as Po (Punctuation, Other) with the name QUESTION MARK. The inverted question mark ¿ (U+00BF), required at the start of Spanish interrogative sentences, is its most familiar relative — a mirrored twin that English speakers almost never encounter outside language class.

Punctuation

Technical Details

Code Example

</>
const char *url = "/search?q=ascii"; // '?' starts the query string
const char *qs = strchr(url, '?'); // Find delimiter
const char *param = qs ? qs + 1 : ""; // Skip '?' if present

Frequently Asked Questions

  • The ? separates the path from the query string: /search?q=hello&lang=en. Everything after ? consists of key=value pairs joined by &. The server receives these as request parameters. Technically, ? is the only character that signals 'query string starts here' in the URL spec.

  • ?. safely accesses nested properties without throwing if an intermediate value is null/undefined: user?.address?.city returns undefined instead of crashing. Before optional chaining, you needed verbose checks: user && user.address && user.address.city. It was added in ES2020.

  • ? makes the preceding element optional (matches zero or one time). colou?r matches both 'color' and 'colour'. After a quantifier, ? makes it lazy (non-greedy): .*? matches as little as possible. In groups, ? enables special syntax: (?:...) for non-capturing, (?=...) for lookahead.

  • condition ? valueIfTrue : valueIfFalse is the conditional (ternary) operator — a compact if/else expression. Example: const label = age >= 18 ? 'adult' : 'minor'. It exists in C, JavaScript, Java, PHP, and most C-family languages. Nesting ternaries hurts readability — use if/else instead.

@workani&@alexluthor
Privacy & legal

Privacy

No accounts, no ads, no tracking cookies, and no cross-site tracking. The only analytics we keep are faceless — anonymous, aggregated counts of pages and searches, never tied to you. We store no IP addresses, set no tracking cookies, and build no profiles. Cloudflare hosts the site and handles requests for delivery and security.

Full privacy policy·Extension privacy·legal@asciify.dev

Attributions & licenses

Twemoji
© Twitter, Inc and other contributors · CC-BY 4.0
Noto Color Emoji
© Google · Apache 2.0
Fluent UI Emoji
© Microsoft · MIT
OpenMoji
© HfG Schwäbisch Gmünd · CC-BY-SA 4.0
Toss Face
© Viva Republica (Toss) · SIL OFL 1.1
JoyPixels
© JoyPixels Inc. · Free Limited Use License
SerenityOS Emoji
© The SerenityOS Developers · BSD-2-Clause
EmojiTwo
© EmojiTwo contributors · CC-BY 4.0
Apple Color Emoji
© Apple, Inc.
Facebook Emoji
© Meta Platforms, Inc.

Apple and Facebook emoji styles are proprietary and shown here solely for reference and comparison — a common-sense application of nominative-use / fair-use principles. asciify is not affiliated with, endorsed by, or sponsored by Apple, Inc., Meta Platforms, Inc., or any other rights holder listed above. If a rights holder requests removal of their emoji style from this site, it will be removed.

All other vendor emoji are reproduced for reference and comparison under their respective open licenses listed above.

Character names and code points from the Unicode® Standard. Unicode® and the Unicode Logo are registered trademarks of Unicode, Inc.

Privacy
© asciify.dev 2025-2026