O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

One More Example

Let's run one more printing example, one that makes use of some of C's special escape characters. In particular, the program in Listing 3.10 shows how backspace (\b), tab (\t), and carriage return (\r) work. These escape character escape character escape character escape character escape character escape character escape character escape character escape character escape character concepts date from when computers used teletype machines for output and they don't always translate successfully to contemporary graphical interfaces. For example, this listing doesn't work as described on some Macintosh implementations.

Listing 3.10. The escape.c Program
 /* escape.c--uses escape characters */ #include <stdio.h> int main(void) { float ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required