![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Deal with binary sequences | Indalecio | UNIX for Advanced & Expert Users | 2 | 02-09-2009 04:25 PM |
| Escape Sequences appearing in scripts | jwm-wm | UNIX for Dummies Questions & Answers | 1 | 05-08-2008 01:31 PM |
| copying image sequences | jonson | Shell Programming and Scripting | 1 | 11-15-2006 06:16 AM |
| Available escape sequences | Love | SUN Solaris | 6 | 06-20-2006 07:31 AM |
| AWK and hex sequences | JoeTheGuy | Shell Programming and Scripting | 5 | 10-17-2002 08:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Trigraph sequences
Hi,
i have read trigraph sequence in The C99 Draft (N869, 18 January, 1999) printf("Eh???/n"); will produce printf("Eh?\n"); what does that mean? i tried that but i am getting the same output i.e Eh???/n. what actually these tri graph characters are? any idea why ,when and where these are used? Thanks for your valuable answers. |
|
|||||
|
Some characters in the C/C++ basic character set are not available on all keyboards. Trigraphs were "invented" to enable these characters to be entered into C/ C++ source code using a sequence of three ISO 646 characters. More information is available in this Wikipedia: Digraphs and trigraphs article.
With gcc you have to use the --trigraph option to enable trigraph functionality. Code:
$ cat t.c
#include <stdio.h>
main()
{
printf("Eh???/n");
}
$ gcc -o t t.c
$ ./t
Eh???/n$
$ gcc --trigraphs -o t t.c
$ ./t
Eh?
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|