• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 知识库 知识库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

fscanf函数的用法返回值fscanf函数的用法

武飞扬头像
xhjyxxw
帮助0

知行礼动

大家好,今日小科来聊聊一篇关于fscanf函数的用法返回值,fscanf函数的用法的文章,现在让我们往下看看吧!

1、功 能: 从一个流中执行格式化输入,fscanf遇到空格和换行时结束,注意空格时也结束。

2、这与fgets有区别,fgets遇到空格不结束。

3、用 法: int fscanf(FILE *stream, char *format,[argument...]); 例一#include #include int main(void){int i;printf("Input an integer: ");/* read an integer from thestandard input stream */if (fscanf(stdin, "%d", &i))printf("The integer read was: %d",i);else{fprintf(stderr, "Error reading an integer from stdin.");exit(1);}return 0;}。

本文到此分享完毕,希望对大家有所帮助。

这篇好文章是转载于:知行礼动

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 知行礼动
  • 本文地址: /news/detail/tanhchjbje