函数返回写入的字符的 ASCII 码值

include<stdio.h>
int main()
{
FILE* pf = fopen(&quot;text.txt&quot;, &quot;r&quot;);
if (pf == NULL)
{
perror(&quot;fopen&quot;);
return 1;
}
// 读文件
int ch = fgetc(pf);
printf(&quot;%c\n&quot;, ch);

ch = fgetc(pf);
printf(&quot;%c\n&quot;, ch);

ch = fgetc(pf);
printf(&quot;%c\n&quot;, ch);

ch =www.laipuhuo.com fgetc(pf);
printf(&quot;%c\n&quot;, ch);

ch = fgetc(pf);
printf(&quot;%c\n&quot;, ch);
————————————————

                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
                        
原文链接:https://blog.csdn.net/2401_83871176/article/details/141439501
全部评论

相关推荐

这不纯纯作弊了吗😢😢😢
编程界菜鸡:信这个的这辈子有了,这智商你靠啥都没用
你找工作的时候用AI吗?
点赞 评论 收藏
分享
06-12 16:23
已编辑
小米_软件开发(准入职员工)
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务