47 Contributors: 3 Friday, September 30, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial:
Roadmap: roadmap

Multi-Character Character Sequence


Not all preprocessors support trigraph sequence processing. Some compilers give an extra option or switch for processing them. Others use a separate program to convert trigraphs.

The GCC compiler does not recognize them unless you explicitly request it to do so (use -trigraphs to enable them; use -Wtrigraphs, part of -Wall, to get warnings about trigraphs).

As most platforms in use today support the full range of single characters used in C, digraphs are preferred over trigraphs but the use of any multi-character character sequences is generally discouraged.

Also, beware of accidental trigraph use (puts("What happened??!!");, for example).

Related Examples