Skip to content

C-Trigraphs shows how to use ancient trigraph characters in C programming language

License

Notifications You must be signed in to change notification settings

ArdeshirV/C-Trigraphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C-Trigraphs

C-Trigraphs shows how to use trigraphs. Trigraphs were very old method to show characters in C programming language when you had to use very old keyboards without many usual everyday characters like: [ ] { | } ~ # |

This is the code:

// trigraph.c
// Copyright (c) 2018 ardeshirv@protonmail.com, Licensed Under GPLv3+
#include 
int main() { printf("??( ??/ ??) ??< ??! ??> ??- ??= ??!\n"); }

You can run code by: make run

And you will see this output:

# Compiled with old behavior: gcc -trigraphs ...
./trigraph-old
[  ] { | } ~ # |
# Compiled with new behavior: gcc ...
./trigraph-new
??( ??/ ??) ??< ??! ??> ??- ??= ??!

Copyright© 2018 ardeshirv(at)protonmail.com Licensed Under GPLv3+