Trigraphs in C++ with Examples Improve Improve Improve Like Article Like Save Article Save Share Report issue Report In C++, a trigraph is a three-character sequence that represents a single character. It means that trigraph sequences are the set of three characters starting from double question marks (??). These characters are constructed using a sequence of 3 characters called trigraphs and these set of the characters are replaces by a single character. S.No.TrigraphEquivalent1.??=#2.??/\3.??’^4.??([5.??)]6.??!|7.??<{8.??>}9.??-~ Syntax: ??=define Becomes, #define Below is the basic implementation example of the Trigraphs sequences: C++ // C++ implementation to // illustrate the example // of trigraph sequences # include <iostream> using namespace std; ??=define MSG "GeeksforGeeks"??=define Program "C++" // Driver Code int main() ??< // Here ??< denotes { cout << "My message to " << MSG << endl; cout << "My program is " << Program; return 0; ??> // Here ??> denotes } Output: My message to GeeksforGeeks My program is C++ Below is another example of the Trigraph sequences: C++ // C++ program to demonstrate // the example // of trigraph sequences # include <iostream> using namespace std; // Here ??= denotes # ??=define Name "Kalpana"??=define Age "23"??=define Qualification "B.tech"??=define From "Delhi" // Driver Code int main() ??< cout << "My Name is: " << Name << endl; cout << "My Age is: " << Age << endl; cout << "My Qualification is: " << Qualification << endl; cout << "I'm From " << From; return 0; ??> Output: My Name is: Kalpana My Age is: 23 My Qualification is: B.tech I'm From Delhi Last Updated : 17 Jul, 2020 Like Article Save Article Previous Different Ways to Initialize a Variable in C++ Next Convert given Decimal number into an irreducible Fraction Share your thoughts in the comments Add Your Comment Please Login to comment...