Skip to content

Instantly share code, notes, and snippets.

@bfeitknecht
Last active March 24, 2026 15:23
Show Gist options
  • Select an option

  • Save bfeitknecht/ce6fd221f6c4ac7e4344773bcd04c37c to your computer and use it in GitHub Desktop.

Select an option

Save bfeitknecht/ce6fd221f6c4ac7e4344773bcd04c37c to your computer and use it in GitHub Desktop.
Trigraphs

Try Some Trigraphs!

Apparently, in the early days of computers peoples' keyboards were just missing some letters sometimes? So that's why they had trigraphs and digraphs. Character groups that would indicate one of those pesky important letters you couldn't type. Here's an example for demonstration purposes. Notice the multiple returns. This is fine because the comment above the first is an escaped linebreak. So if trigraphs are enabled that doesn't get compiled. Pretty wonky but nonetheless genius. You can compile it with pre-C23 and probably have to pass -trigraphs.

int foo() ??<
    // ??/
    return 1;
    return 0;
??>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment