Fundamentals of Reading and Writing Information 163
7
TABLE7.3 The Trigraph Sequences
Code Character equivalent
??= #
??( [
??/ \
??) ]
??’ ^
??< {
??! |
??> }
??- ~
If a trigraph sequence codes—one of the values in Table 7.3—is present in your source
file, it will be changed to the character equivalent. It will be changed even if it is part of
a string. For example,
printf(“??[WOW??]”);
Will be changed to
printf(“[WOW]”);
If extra question marks are included, they are not changed. For example,
printf(“???-”);
will be changed to
printf(“?~”);
Summary ............................................................................................................
With the completion of today’s lesson, you are ready to write your own C programs. By
combining the printf(),puts(), andscanf()functions and the programming control
statements you learned about in earlier days, you have the tools needed to write simple
programs.
Screen display is performed with the printf()andputs()functions. The puts()func-
tion can display text messages only, whereas printf()can display text messages and
variables. Both functions use escape sequences for special characters and printing con-
trols.
11 448201x-CH07 8/13/02 11:20 AM Page 163