版本4和5间的区别
于2007-07-18 21:13:36修订的的版本4
大小: 1363
编辑: czk
备注:
于2008-02-23 15:35:52修订的的版本5
大小: 1363
编辑: localhost
备注: converted to 1.6 markup
删除的内容标记成这样。 加入的内容标记成这样。
行号 2: 行号 2:
[[Navigation(slides)]] <<Navigation(slides)>>
行号 14: 行号 14:
[[Include(^TCPL/B\.01\..*,,titlesonly)]] <<Include(^TCPL/B\.01\..*,,titlesonly)>>

<<Navigation: 执行失败 ['AllContext' object has no attribute 'values'] (see also the log)>>

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.

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

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