Dotcpp  >  编程教程  >  stdio.h头文件  >  C语言putw()函数:把一字符或字送到流中

C语言putw()函数:把一字符或字送到流中

点击打开在线编译器,边学边练

函数名: putw

头文件:<stdio.h>

函数原型: int putw(int w, FILE *stream);

功 能: 把一字符或字送到流中

参 数:int w 为要输出的字符或字送到流中

           FILE *stream 为要操作的流

返回值:返回输出的整数 

 

程序例:  将整数word输出到标准输出流中

#include<stdio.h>

int main(void){

   int word=49;

   int res=putw(word,stdout);

   printf("\nThe return value is %d\n",res);

   return 0;

}

 

运行结果 

1
The return value is 49



本文固定URL:https://www.dotcpp.com/course/528

C语言函数库
assert.h头文件
ctype.h头文件
float.h头文件
io.h头文件
math.h头文件
mem.h头文件
setjmp.h头文件
stdio.h头文件
stdlib.h头文件
sigal.h头文件
string.h头文件
time.h头文件
Dotcpp在线编译      (登录可减少运行等待时间)