Two consecutive question marks signify the start of a trigraph sequence. According to the C standard [ISO/IEC 9899:2011],
All occurrences in a source file of the following sequences of three characters (that is, trigraph sequences) are replaced with the corresponding single character.
??=
#
??)
]
??!
|
??(
[
??'
^
??>
}
??/
\
??<
{
??-
~
...
Code Block | ||||
---|---|---|---|---|
| ||||
size_t i = /* some initial value */; /* assignment of i */ if (i > 9000) { if (puts("Over 9000!?""?!") == EOF) { /* Handle Error */ } } |
The above code This code prints Over 9000!??!
, as intended.
...
CERT C++ Secure Coding Standard: PRE07-CPP. Avoid using repeated question marks
ISO/IEC 9899:2011 Section Section 5.2.1.1, "Trigraph sequences"
...