http://en.wikipedia.org/wiki/C_trigraph#C
C
C programming language
supports digraphs in ISO C 94 mode of compiling.
The C preprocessor replaces all occurrences of the
following nine trigraph sequences by their single-character
equivalents before any other processing.
A programmer may want to place two question marks together yet
not have the compiler treat them as introducing a trigraph. The C
grammar does not permit two consecutive ? tokens, so
the only places in a C file where two question marks in a row may
be used are in multi-character constants, string literals, and
comments. To safely place two consecutive question marks within a
string literal, the programmer can use string concatenation
"...?""?..." or an escape sequence
"...?\?...".
Trigraph
Equivalent
??=
#
??/
\
??'
^
??(
[
??)
]
??!
|
??<
{
??>
}
??-
~
??? is not itself a trigraph sequence.
The ??/ trigraph can be used to introduce an
escaped newline for line splicing; this must be taken into account
for correct and efficient handling of trigraphs within the
preprocessor. It can also cause surprises, particularly within
comments. For example:
// Will the next line be executed????????????????/
a++;
which is a single logical comment line (used in C++ and C99),
and
/??/
* A comment *??/
/
which is a correctly formed block comment.
In 1994 a normative amendment to the C standard, included in
C99,
supplied digraphs as more readable alternatives to five of the
trigraphs. They are:
Digraph
Equivalent
<:>
[
:>
]
{
%>
}
%:
#
Unlike trigraphs, digraphs are handled during tokenization, and any digraph must always
represent a full token by itself, or compose the token
%:%: replacing the preprocessor concatenation token
##. If a digraph sequence occurs inside another token,
for example a quoted string, or a character constant, it will not
be replaced.
Notes
References