Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これらの関数の実際の用途は何ですか? つまり、while ループを使用してそれらを使用するとEOF、入力を与えると入力したとおりのもの"hello"が得られ、出力は として得られ"hello"ます。それで、ポイントは何ですか?
EOF
"hello"
int getchar()= 標準入力 (stdin) から次の文字を返します。
int getchar()
基本的に一文字ずつ読む。
putchar(int)= 標準出力 (stdout) に文字を書き込みます。
putchar(int)
正確なデータ型を知らなくても、あらゆるタイプの入出力を処理できます。これにより、IO 操作の制御と柔軟性が向上します。また、scanf/pritnf よりも高速であるため、大量の IO 操作が必要なオンライン プログラミング コンテストで使用できます。