合集-再学C

摘要:众所周知,C语言的scanf()位于<stdio.h>,用于输入数据,但一直以来我都对它的使用方式似懂非懂,今天我们来详细聊聊它。 scanf意为“scan format”, 即格式化输入,原型如下: int scanf(const char *format, ...); 一、基础使用方式 #inc 阅读全文
posted @ 2024-11-23 14:18 hk416hasu 阅读(279) 评论(0) 推荐(0)
摘要:为什么“C语言具有可移植性”? "Any problem in computer science can be solved with another layer of indirection" C语言的设计特性使然,例如其I/O不依赖于特定平台,而是依赖于stdio.h,而库在不同平台上可以有不同 阅读全文
posted @ 2024-11-20 16:03 hk416hasu 阅读(56) 评论(0) 推荐(0)
摘要:在C语言中,由于stdio.h中的缓冲机制,printf的输出常令人感到迷惑。本文将介绍其缓冲机制的具体细节 阅读全文
posted @ 2025-01-26 13:36 hk416hasu 阅读(175) 评论(0) 推荐(2)