版本3和4间的区别
于2007-07-18 21:10:58修订的的版本3
大小: 1347
编辑: czk
备注:
于2007-07-18 21:13:36修订的的版本4
大小: 1363
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 14: 行号 14:
[[Navigation(siblings)]] [[Include(^TCPL/B\.01\..*,,titlesonly)]]

Navigation(slides)

B.1 Input and Output: <stdio.h>

The input and output functions, types, and macros defined in <stdio.h> represent nearly one third of the library.

A stream is a source or destination of data that may be associated with a disk or other peripheral. The library supports text streams and binary streams, although on some systems, notably UNIX, these are identical. A text stream is a sequence of lines; each line has zero or more characters and is terminated by '\n'. An environment may need to convert a text stream to or from some other representation (such as mapping '\n' to carriage return and linefeed). A binary stream is a sequence of unprocessed bytes that record internal data, with the property that if it is written, then read back on the same system, it will compare equal.

A stream is connected to a file or device by opening it; the connection is broken by closing the stream. Opening a file returns a pointer to an object of type FILE, which records whatever information is necessary to control the stream. We will use "file pointer" and "stream" interchangeably when there is no ambiguity.

When a program begins execution, the three streams stdin, stdout, and stderr are already open.

Include(^TCPL/B\.01\..*,,titlesonly)

TCPL/B.01_Input_and_Output:_<stdio.h> (2008-02-23 15:35:52由localhost编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.