摘要: c语言中printf()函数也有一个返回值,它返回打印字符的个数。 #include <stdio.h> int main(void) { int num = 10; int count; count = printf("num:%d\n", num); //printf()函数的返回值是打印字符的 阅读全文
posted @ 2021-08-07 23:45 小鲨鱼2018 阅读(1161) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #define TEST 58 //符号常量or对象式宏 int main(void) { printf("|%d|\n", TEST); printf("|%5d|\n", TEST); //5表示宽度 printf("|%-5d|\n", TEST); 阅读全文
posted @ 2021-08-07 20:56 小鲨鱼2018 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 1、 阅读全文
posted @ 2021-08-07 17:36 小鲨鱼2018 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1、测试文件 [root@centos79 test]# touch a.txt b.txt [root@centos79 test]# ls a.txt b.txt 2、生成测试文件的绝对路径 [root@centos79 test]# ls a.txt b.txt [root@centos79 阅读全文
posted @ 2021-08-07 11:02 小鲨鱼2018 阅读(275) 评论(0) 推荐(0) 编辑