マインドマップギャラリー 標準IO
標準 IO に関するマインド マップです。主な内容は、標準 IO ストリーム、標準ファイル IO 関連関数、標準ファイル IO キャッシュ領域、およびファイル IO です。
2024-11-28 17:59:01 に編集されましたThis is a mind map about the annual work plan of the three pillars of human resources. The main contents include: strategic human resources planning, talent recruitment and allocation, employee performance management, employee training and development, employee relationships and communication, employee welfare and care, human resources information system construction, regulatory compliance and risk management, and organizational culture construction.
This is a mind map for the diagnosis and treatment of acute cerebral hemorrhage in patients with hemodialysis. The annual incidence of acute cerebral hemorrhage in patients with hemodialysis is (3.0~10.3)/1000, and the main cause is hypertension. Compared with non-dialysis patients, the most common bleeding site is the basal ganglia area, accounting for 50% to 80%; but the bleeding volume is large and the prognosis is poor, and the mortality rate is 27% to 83%. Especially for patients with hematoma >50ml, hematoma enlarged or ventricular hemorrhage on the second day after onset, the prognosis is very poor.
The logic is clear and the content is rich, covering many aspects of the information technology field. Provides a clear framework and guidance for learning and improving information technology capabilities.
This is a mind map about the annual work plan of the three pillars of human resources. The main contents include: strategic human resources planning, talent recruitment and allocation, employee performance management, employee training and development, employee relationships and communication, employee welfare and care, human resources information system construction, regulatory compliance and risk management, and organizational culture construction.
This is a mind map for the diagnosis and treatment of acute cerebral hemorrhage in patients with hemodialysis. The annual incidence of acute cerebral hemorrhage in patients with hemodialysis is (3.0~10.3)/1000, and the main cause is hypertension. Compared with non-dialysis patients, the most common bleeding site is the basal ganglia area, accounting for 50% to 80%; but the bleeding volume is large and the prognosis is poor, and the mortality rate is 27% to 83%. Especially for patients with hematoma >50ml, hematoma enlarged or ventricular hemorrhage on the second day after onset, the prognosis is very poor.
The logic is clear and the content is rich, covering many aspects of the information technology field. Provides a clear framework and guidance for learning and improving information technology capabilities.
関連するテンプレートはありません
1日目
標準IOストリーム
いくつかの標準 IO ストリームがあります
ストリームは標準IOコアの操作対象です
プログラムの実行が開始されると、3 つのストリームが自動的に開きます。
標準入力ストリーム stdin はデフォルトでキーボードからの入力になります
標準出力ストリーム strout デフォルトの端末出力
標準エラー出力ストリーム strerr はデフォルトで端末に出力されます
標準出力ストリームと標準エラー出力ストリームの違い
標準出力ストリームがバッファ内にあります。 標準エラー出力ストリームがバッファ内に存在しません。
標準的なストリームインタビューの質問
標準出力ストリームがキャッシュされることがわかっています。キャッシュ領域の内容が端末に表示される可能性のある状況を列挙してください。 1) ' ' に会う 2) バッファ領域がいっぱいです 3) ストリームが閉じられました 4) fflush はリフレッシュを強制します
ファイルIO
ファイルIOとは何ですか
ファイルの入出力に関する操作 // ファイルを開き、ファイルを読み取り、ファイルを書き込み、ファイルを閉じる //I入力O出力
ファイルIOの分類
1. 標準 IO//標準 C ライブラリのファイル関連の操作はライブラリ関数に属します 2. LinuxIO//Linux システムが提供するファイル関連の操作はシステム コールです。
1. システムコール (1) ユーザー空間プロセスがカーネルにアクセスするためのインターフェース (2) ユーザーを基盤となるハードウェア プログラミングから解放する (3) システムのセキュリティが大幅に向上 (4) ユーザプログラムのポータブル化 2. ライブラリ関数 (1) ある機能を実現するためにライブラリ関数によってカプセル化された API の集合 (2) 統一されたプログラミングインターフェースを提供し、アプリケーションの移植を容易にします。
標準ファイルIOはキャッシュ領域に存在します
フルキャッシュ
//標準IOがバッファに存在する //「 」を追加しない場合は、キャッシュがいっぱいであることを意味し、バッファ領域がいっぱいになると、統合印刷のためにオペレーティング システムによって処理されます。 //キャッシュ領域のデフォルトサイズは1024バイトです
ラインキャッシュ (端末のみで利用可能)
// を追加すると、フル キャッシュはライン キャッシュになり、' ' が見つかると出力コンテンツはオペレーティング システムに渡されて処理され、出力されます。端末上で。 //注: ライン キャッシュの概念は、出力オブジェクトが端末の場合にのみ存在します。
標準ファイルIO関連機能
1.fopen関数
機能: ファイルを開く
パラメータの説明
戻り値 FILE* ポインタ、ファイル ストリーム ポインタ、FILE は構造体です。ファイルが開かれるたびに、カーネルはファイルを開くことによって取得された関連情報を保存するためのスペースを開きます。 成功: Return FILE* (空ではない)//stream ストリームは標準 IO のコア オブジェクトです 失敗: NULL を返す
2. fgetc関数
機能: 一度に 1 文字ずつ読み取ります (文字通りに読み取ります)。
パラメータの説明
戻り値 成功: 実際に読み取られた文字に対応するASCII値 失敗: //ファイルの末尾が読み取られると、戻り値は EOF、つまり -1 になります。 戻り値は-1です EOF(-1)を返す #EOF -1 を定義します
3.fputc関数
機能: ファイルに文字を書き込みます
パラメータの説明
4. fclose関数
機能: ファイルを閉じ、キャッシュ領域を更新し、キャッシュ領域の内容をクリアします。
パラメータの説明
戻り値 成功: 0を返す 失敗: -1 を返す
戻り値: 成功: 書かれた文字を返します 失敗: -1 を返す
演習 1
5. エラー関数
パラメータの説明
戻り値 なし
6. ストエラー関数
機能:エラーメッセージを出力する機能 Linux システムには、エラー メッセージ番号を保存するためにグローバル変数があり、エラー出力情報の出力はエラー番号に基づいて行われます。
パラメータの説明
戻り値: char * エラー原因文字列の先頭アドレス "そのようなファイル、又はディレクトリはありません"
7. fgets関数
機能: 一度に 1 行ずつ読み取ります ( 改行文字は読み取りの終了文字として使用されます)
パラメータの説明
戻り値: 成功: char * //読み出した文字列の行の先頭アドレス 失敗: NULL を返します。ファイルの最後まで読み取る場合は NULL を返します。
8. fputs関数
機能: 毎回文字列を書き込む
パラメータの説明
戻り値: 成功: >= 0 //非負の数 失敗: EOFを返す
演習 2
9. フレッド関数
関数: 指定したサイズでコンテンツを読み取る 一度に 1 セグメントを読み取ります (1 セグメントはブロック単位で測定されることに注意してください)
パラメータの説明
戻り値: 成功: 実際に読み取られたブロック数 実際に読み取られたレコード数 実際に読み取られたオブジェクトの数 実際に読み取られたバイト数を表すとは言えません。 失敗: 0以下
10.fwrite関数
機能: ブロックに書き込む
パラメータの説明
戻り値: 成功: 実際に書き込まれたブロック数 失敗: 0未満
11. sprintf、fprintf関数
スプリントフ
機能: 書式設定された文字列を文字配列に書き込みます。
パラメータ
fprintf
機能: ストリームに対応して開かれたファイルにフォーマットされた文字列を書き込みます
パラメータ
printf sprintf fprintf の違い
1. printf はフォーマットされた文字列を端末に出力します sprintf はフォーマットされた文字列を文字配列に出力します fprintf はフォーマットされた文字列をファイルデバイスに出力します 2. sprintf と fprintf はリダイレクトできませんが、printf はリダイレクトできます。
12. memset関数
機能: メモリ設定関数、memset は初期化関数、 この機能は、メモリの特定のブロック内のすべてを指定された値に設定することです。
パラメータの説明
戻り値: 設定したメモリ空間の開始アドレス
13. fseek関数
機能: ファイル ポインタは、FILE 構造体のメンバ変数です。ファイル ポインタの位置を移動します。
パラメータの説明
戻り値: 成功: 0 失敗: EOF -1
14.ftell関数
関数: ファイルポインタの位置を取得する ファイルポインタの位置インデックスは0から始まります
パラメータの説明
戻り値 成功: 現在のファイル ポインタの位置を返します。 失敗: EOF