) (Right Parenthesis) is ASCII code point 41 (0x29), Unicode U+0029, and a printable punctuation character. It closes what its partner opened — the second half of a grammatical or mathematical enclosure, signaling that the detour is over and the main sentence resumes. In code, ) appears far more often than you consciously notice, since every function call, conditional, and grouped expression demands one. Languages like Python use it to close tuple literals, where a trailing comma before the closing paren is the difference between a one-element tuple (42,) and a merely parenthesized integer (42). Lisp programmers stack them by the dozen at the end of blocks without blinking. In Bash, ) marks the end of each pattern in a case statement — an asymmetric syntax where no opening ( is required, baffling anyone expecting matched pairs. The sneakiest bug this character enables is in macro expansion: C preprocessor macros like #define SQUARE(x) x * x break when called as SQUARE(1+2) because the expansion 1+2 * 1+2 follows precedence rules the author didn't intend. Wrapping the body in parentheses ((x) * (x)) is the fix every C programmer learns the hard way. Typographically, left and right parentheses arrived together in Renaissance mathematical writing, always conceived as a matched pair rather than independent symbols. UTF-8 encodes it as a single byte 0x29. Unicode classifies it as Pe (Punctuation, Close) with the name RIGHT PARENTHESIS — the Pe category being the mirror of Ps (Punctuation, Open), which houses its counterpart.
int a = 2, b = 3, c = 4;int x = a * (b + c); // ')' closes groupingint y = a * b + c; // different precedence without ')'
ASCII treats ( and ) as independent characters (codes 40 and 41) even though they're always used in pairs. Each needs its own code because computers process text as a sequence of bytes — there's no concept of 'paired' characters at the encoding level.
The :) smiley was one of the first emoticons, proposed by Scott Fahlman in 1982 on a Carnegie Mellon message board. He chose :-) because ) already resembled a smile when turned sideways. This simple reuse of a punctuation mark launched an entire communication revolution.
It means there's a closing parenthesis without a corresponding opening one. This usually happens from copy-paste errors, deleted lines, or miscounted nesting. Modern editors highlight matching pairs — if clicking on ) doesn't highlight its partner, you have a mismatch.
Parentheses are technically legal in URLs but cause issues in Markdown, wiki syntax, and some link parsers (e.g., Wikipedia URLs like /wiki/C_(programming_language)). URL-encoding them as %28 and %29 handles edge cases, but most browsers accept them literally.