Digraphs
suggest changeDigraphs are alternative two-character spellings for five C punctuators:
| Digraph | Equivalent |
|---|---|
<: |
[ |
:> |
] |
<% |
{ |
%> |
} |
%: |
# |
They are recognized as tokens, so the same characters inside a string literal or character constant are unchanged:
#include <stdio.h>
int main(void)
<%
puts("The text %> is not replaced inside this string.");
%>
Digraphs remain part of C, unlike trigraphs, which were removed in C23. Ordinary punctuator spellings are clearer for new code.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents