Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 849 Bytes

File metadata and controls

41 lines (32 loc) · 849 Bytes

fputc

  • cstdio[meta header]
  • std[meta namespace]
  • function[meta id-type]
namespace std {
  int fputc( int ch, FILE* stream );
}

概要

指定されたファイルストリームに1文字出力する。

putcとは違い、関数として定義することが定められているため、引数は一度しか評価されないことが保証されている。

戻り値

出力された文字を返す。

失敗した場合、EOFを返す。

#include <cstdio>

int main() {
  std::fputc('a', stdout);
}
  • std::fputc[color ff0000]
  • stdout[link /reference/cstdio/stdout.md]

出力

a

処理系