Home »
C++ programming language
Trigraph Sequences in C++ programming
C++ | Trigraph Sequences: In this tutorial, we are going to learn about the various trigraph sequences with examples in C++ programming.
Submitted by IncludeHelp, on June 18, 2020
Trigraph Sequences in C++
Trigraph Sequences in C++ are the set of three characters starting from double question marks (??). These set of the characters replaces by a single character specified in the below table.
List of Trigraph Sequences in C++
Trigraph |
Replacement |
??= |
# |
??/ |
\ |
??' |
^ |
??( |
[ |
??) |
] |
??! |
| |
??< |
{ |
??> |
} |
??- |
~ |
Syntax of Using Trigraph Sequences in C++
??=define
Becomes,
#define
C++ program of trigraph sequences
// C++ program to demonstrate the example
// of trigraph sequences
# include <iostream>
using namespace std;
??=define MSG "Hello, world!"
??=define COUNTRY "INDIA"
int main()
??<
cout << "My message is: " << MSG << endl;
cout << "My country is: " << COUNTRY << endl;
return 0;
??>
Output
My message is: Hello, world!
My country is: INDIA