By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,686 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,686 IT Pros & Developers. It's quick & easy.

Trigraph sequences

P: n/a

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");
??>
--

P.Krumins
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <Xn*******************************@130.133.1.4>, Peteris Krumins wrote:
[cut]
Does this mean i can write something as obfuscated as:

[code using trigraphs]
Yes.
--
Andreas Kähäri
Nov 13 '05 #2

P: n/a

"Andreas Kahari" <ak*******@freeshell.org> wrote in message
news:sl**********************@vinland.freeshell.or g...
In article <Xn*******************************@130.133.1.4>, Peteris Krumins wrote: [cut]
Does this mean i can write something as obfuscated as:

[code using trigraphs]
Yes.

Of course, it doesn't mean you *should*.

--
poncho
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.