| ptr | 出力するデータの先頭アドレス。
変数型はvoid型でなくても良い。 The first address of the data to output. The variable type may not be void-type. |
| size | 出力するデータ型の1データあたりのサイズ(バイト数)。 The size (the number of bytes) of each data sample to output. |
| n | 出力するデータ数。 The number of data to output. |
| stream | 出力先のファイルのファイルポインタ。 The file pointer of the file to write. |
| 条件 Condition |
動作 Behaviour of the function |
| ptr=NULL | プログラムをエラー終了する。 The program finishes as an error. |
| size≤0 | プログラムをエラー終了する。 The program finishes as an error. |
| n≤0 | プログラムをエラー終了する。 The program finishes as an error. |
| stream=NULL | プログラムをエラー終了する。 The program finishes as an error. |
| 関数fwriteの戻り値(出力したデータ数)<nとなった。 The return value of function fwrite (the number of data written) was less than n. |
プログラムをエラー終了する。 The program finishes as an error. |
| 上記以外の場合 The other cases |
関数fwriteを用いてptrに格納されたsizeバイトのデータn個を
streamに出力する。 Write n data of size bytes in ptr to stream using function fwrite. |