Search code examples
ctrigraphs

Trigraph characters


c99 standard  5.2.1.1 Trigraph sequences

2 EXAMPLE The following source line

printf("Eh???/n");

becomes (after replacement of the trigraph sequence ??/)

printf("Eh?\n");

It's saying that it will replace the trigraph sequence, but it's not .

It's printing "Eh???/n"

Am I missing something ?


Solution

  • Trigraphs are disabled by default in gcc. If you are using gcc then compile with -trigraphs to enable trigraphs:

    gcc -trigraphs source.c