* remove "\r" nonsense
[mascara-docs.git] / C / the.ansi.c.programming.language / c.programming.notes / sx12.html
blob371498e944aa478e9dea27a047b7771adcf5e02c
1 <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
2 <!-- This collection of hypertext pages is Copyright 1995, 1996 by Steve Summit. -->
3 <!-- This material may be freely redistributed and used -->
4 <!-- but may not be republished or sold without permission. -->
5 <html>
6 <head>
7 <link rev="owner" href="mailto:scs@eskimo.com">
8 <link rev="made" href="mailto:scs@eskimo.com">
9 <title>Chapter 12: Input and Output</title>
10 <link href="sx11d.html" rev=precedes>
11 <link href="sx12a.html" rel=precedes>
12 <link href="top.html" rev=subdocument>
13 </head>
14 <body>
15 <H1>Chapter 12: Input and Output</H1>
17 <p>So far, we've been calling <TT>printf</TT>
18 to print formatted output to the ``standard output''
19 (wherever that is).
20 We've also been calling <TT>getchar</TT>
21 to read single characters from the ``standard input,''
22 and <TT>putchar</TT> to write single characters to the standard output.
23 ``Standard input'' and ``standard output''
24 are two predefined I/O <dfn>streams</dfn>
25 which are implicitly available to us.
26 In this chapter
27 we'll learn how to take control of input and output
28 by opening
29 our own streams,
30 perhaps connected to data files,
31 which we can
32 read from and write to.
33 </p><p><a href="sx12a.html" rel=subdocument>12.1 File Pointers and <TT>fopen</TT></a></p>
34 <p><a href="sx12b.html" rel=subdocument>12.2 I/O with File Pointers</a></p>
35 <p><a href="sx12c.html" rel=subdocument>12.3 Predefined Streams</a></p>
36 <p><a href="sx12d.html" rel=subdocument>12.4 Closing Files</a></p>
37 <p><a href="sx12e.html" rel=subdocument>12.5 Example: Reading a Data File</a></p>
38 <hr>
39 <p>
40 Read sequentially:
41 <a href="sx11d.html" rev=precedes>prev</a>
42 <a href="sx12a.html" rel=precedes>next</a>
43 <a href="top.html" rev=subdocument>up</a>
44 <a href="top.html">top</a>
45 </p>
46 <p>
47 This page by <a href="http://www.eskimo.com/~scs/">Steve Summit</a>
48 // <a href="copyright.html">Copyright</a> 1995, 1996
49 // <a href="mailto:scs@eskimo.com">mail feedback</a>
50 </p>
51 </body>
52 </html>