Trigraph sequences

P

Peteris Krumins

Hello,

while reading through iso c standard (August 3, 1998), I noticed
something I had never heard of in C: "Trigraph sequences", 5.2.1.1

The standard says:
"All occurrences in a source file of the following sequences of
three characters (called trigraph sequences)) are replaced with
the corresponding single character."

EXAMPLE

The following source line
printf("Eh???/n");

becomes (after replacement of the trigraph sequence ??/)
printf("Eh?\n");

Does this mean i can write something as obfuscated as:

--
??=include <stdio.h>

int
main(void)
??<
printf("hello world??\n");
??>
 
S

Scott Fluhrer

Andreas Kahari said:
[cut]
Does this mean i can write something as obfuscated as:
[code using trigraphs]


Yes.
[/QUOTE]
Of course, it doesn't mean you *should*.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top