Digraphs

suggest change

Digraphs 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents