標準入出力
「標準入出力」を扱った31問。日付を開くと、その日のドリルがそのまま読めます。日付の横の動物は難易度で、ハリネズミ・孔雀・バイソン・クジラの順に重くなります。
- Haskell / READ · 2026-11-19 パスをprintする show, print, putStrLn, 文字列リテラル, エスケープ, Show型クラス, string literal escape
- Zig / WRITE · 2026-11-14 空でない行に番号を振る std.Io.Reader, std.Io.Writer, takeByte, 行番号, 行の先頭, 最後の改行, EndOfStream, line numbering, streaming copy
- Zig / READ · 2026-11-14 まだ送っていない分を書く std.Io.Writer, buffered, flush, バッファ付き出力, まだ書き出していないバイト, 引数の評価順, buffered writer, pending bytes
- Zig / DEBUG · 2026-11-14 写したinterfaceで書く std.Io.Writer, interface フィールド, @fieldParentPtr, 構造体のコピー, ポインタで渡す, flush, writer interface, copied interface
- Zig / WRITE · 2026-11-04 Writerへ16進で書く std.Io.Writer, インターフェース, 書式指定, 16進数, ゼロ埋め, Writer interface, hex dump, zero padding
- Zig / READ · 2026-11-04 コンマで区切って読む std.Io.Reader, takeDelimiter, 区切り文字, 空の欄, 末尾の区切り, delimiter, empty field, trailing delimiter
- Zig / DEBUG · 2026-11-04 エラーで抜けると消える行 std.Io.Writer, flush, errdefer, tryで抜ける, バッファに残った出力, buffered output, early return, error path
- Zig / READ · 2026-11-02 最後のflushがない std.Io.Writer, バッファ付き出力, flush, 標準出力, buffered writer, flush the buffer
- Zig / DEBUG · 2026-11-02 Writerを値で取り出す std.Io.Writer, interface, @fieldParentPtr, 構造体のコピー, File.Writer, vtable, copying the interface
- C / READ · 2026-11-02 printfとroundの丸め 偶数への丸め, 四捨五入, round関数, printf の %.0f, round half to even, round half away from zero, banker's rounding
- C / READ · 2026-11-01 freadが返す個数 fread, 戻り値, 要素の個数, ファイル位置表示子, 部分読み込み, short read, file position indicator
- C / DEBUG · 2026-11-01 見出しを後から埋める fopen のモード, 追記モード, a+, w+, fseek, 部分書き込み, append mode, overwrite in place
- Zig / READ · 2026-10-30 埋める文字と揃える向き 書式指定, 幅と揃え, 埋め文字, ゼロ埋め, 16進数表示, std.Io.Writer.print, fill and alignment
- C++ / WRITE · 2026-10-17 coutと順番が揃う整形出力 sync_with_stdio, std::print, std::format, stdoutとstd::cout, 出力の順番, 書式指定, output ordering, mixing C and C++ I/O
- C++ / READ · 2026-10-17 同期を切る関数の戻り値 sync_with_stdio, 戻り値は以前の状態, 関数内static変数, 一度だけの初期化, CとC++の入出力の混在, previous synchronization state, function-local static
- C++ / DEBUG · 2026-10-17 ファイルにすると崩れる表 sync_with_stdio, std::endl, printfとstd::coutの混在, 全バッファリング, 行バッファリング, fully buffered, line buffered, output ordering
- C / DEBUG · 2026-10-12 足し込んだ長さの先で溢れる snprintf の返り値, 切り捨て, size_t の回り込み, 文字列の連結, snprintf return value, truncation, unsigned wraparound, string concatenation
- C++ / WRITE · 2026-10-08 件数の行のあとの名前 std::getline, 抽出演算子のあとの改行, istream::ignore, std::ws, 数字のあとにgetline, getline after cin, leftover newline
- C++ / READ · 2026-10-08 カンマで区切る行 std::getline, 区切り文字, 改行が残る, CSVの読み込み, getline delimiter, newline in token
- C / WRITE · 2026-10-08 2つのファイルを比べる getc, EOF, ファイルの比較, cmp, 一定のメモリで読む, compare two files, streaming comparison
- C / READ · 2026-10-08 4バイトずつ読む行 fgets, 固定長バッファで行を読む, 改行で終わらない最後の行, 行の長さを数える, read lines with a fixed buffer, missing trailing newline
- C / DEBUG · 2026-10-08 8バイトずつ数える改行 freadの戻り値, feofによるループ, 前回のバッファの残り, 行数を数える, while (!feof), fread return value, stale buffer
- C / WRITE · 2026-09-30 後始末を飛ばして終わる _Exit, fflush, 出力バッファ, 後始末を呼ばない終了, exit without atexit handlers, flush before _Exit
- Rust / DEBUG · 2026-09-27 read_lineに残るCR read_line, 改行の除去, CRLF, trim_end_matches, BufRead, strip newline
- C / WRITE · 2026-09-21 sscanfの結果を確認 sscanf, 入力検証, 戻り値, input validation
- C / READ · 2026-09-21 sscanfの戻り値 sscanf, 戻り値の確認, 入力の検証, scanf return value
- C / DEBUG · 2026-09-21 scanfの結果を信じる scanf, 未初期化, 戻り値, input validation
- C++ / WRITE · 2026-09-06 空行で区切る段落 std::getline, 段落, 空行区切り, 最後の段落, 入力の終わり, paragraphs separated by blank lines, end of input, flush last group
- C++ / READ · 2026-09-06 空行と入力の終わり std::getline, 空行, 入力の終わり, 末尾の改行, getline empty line, end of input, trailing newline
- C++ / DEBUG · 2026-09-06 eof()で回すと1周多い while (!eof()), std::getline, 空行を数える, 最後の1周, eof loop, getline returns stream, extra iteration
- C / WRITE · 2026-09-06 assertの外で読む assert の中の副作用, NDEBUG, リリースビルド, sscanf の戻り値, assert with side effects, release build, NDEBUG