Dienstag, 22. März 2011

fscanf() and scanf()

fscanf() and scanf()

in image or audio, you need to read in a binary data file for processing . . .

1. scanf() reads data from the standard input unit ( the keyboard by default) and fscanf() reads the input from a file specified by the first parameter.

2. scanf() reads from stdin; fscanf() reads from a user-specified stream.

3. scanf() or fscanf() reads and converts a stream of characters from the input file, and stores the converted values in the list of variables found in the address list.

4. They return the number of successful data conversions. If end of file is reached before any data are converted, it returns EOF.

Keine Kommentare: