上一页 1 ··· 247 248 249 250 251 252 253 254 255 ··· 367 下一页
摘要: c语言中使用sizeof()输出各种数据类型的大小。 #include <stdio.h> int main(void) { printf("short: %zd.\n", sizeof(short)); printf("int: %zd.\n", sizeof(int)); printf("lon 阅读全文
posted @ 2021-07-26 23:05 小鲨鱼2018 阅读(3824) 评论(0) 推荐(0) 编辑
摘要: c语言中浮点数的声明与输出。 [root@centos79 test]# cat test2.c #include <stdio.h> int main(void) { float f = 1000.0; double d = 1000.0; long double ld = 1000.0; pri 阅读全文
posted @ 2021-07-26 22:52 小鲨鱼2018 阅读(459) 评论(0) 推荐(0) 编辑
摘要: char类型用于存储字符(比如字母或者标点),但是从技术层面讲,char类型是整数,因为char类型存储的是整数而不是字符。 计算机使用字符编码来处理字符,即 用特定的整数来表示特定的字符。 例如在ASCII编码中, 大写字母A存储的是65. char类型通常被定义为8位的存储单元。 通常1个字节被 阅读全文
posted @ 2021-07-26 22:31 小鲨鱼2018 阅读(9024) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { signed short ss= 100; unsigned short us= 100; signed int si= 100; unsigned int ui= 100; signed long sl= 100; un 阅读全文
posted @ 2021-07-26 21:29 小鲨鱼2018 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int num = 100; printf("decimal: %d.\n\n", num); printf("octal: %o.\n", num); printf("octal: %#o.\n\n", num); pr 阅读全文
posted @ 2021-07-26 21:17 小鲨鱼2018 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos79 test]# ls [root@centos79 test]# mkdir test1 [root@centos79 test]# touch test1/a.txt [root@centos79 test]# ll total 0 drwxr-xr-x. 阅读全文
posted @ 2021-07-26 10:49 小鲨鱼2018 阅读(2722) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos79 test]# cat a.txt e r w i s g n c w d h x 2、awk [root@centos79 test]# cat a.txt e r w i s g n c w d h x [root@centos79 test]# awk 阅读全文
posted @ 2021-07-26 00:26 小鲨鱼2018 阅读(1289) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 2、生成中间文件,假设4行为一列 [root@centos79 test]# cat a.txt 01 阅读全文
posted @ 2021-07-25 23:59 小鲨鱼2018 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos79 test]# cat a.txt e t c i w s g g d z c i o n m 2、转换为一行 [root@centos79 test]# cat a.txt e t c i w s g g d z c i o n m [root@cento 阅读全文
posted @ 2021-07-25 23:36 小鲨鱼2018 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 阅读全文
posted @ 2021-07-25 23:21 小鲨鱼2018 阅读(240) 评论(0) 推荐(0) 编辑
上一页 1 ··· 247 248 249 250 251 252 253 254 255 ··· 367 下一页