c
GshWooho
这个作者很懒,什么都没留下…
展开
-
利用mmap将任意大小的磁盘文件复制到stdout
mmap为虚拟内存映射函数 #include <unistd.h> #include <sys/mman.h> void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); 例程: #include <unistd.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/原创 2022-05-06 09:01:34 · 240 阅读 · 0 评论 -
printf(“%02x\n“, c) 之坑
转载 #include <stdio.h> int main() { char c1 = -1; printf("%02x\n", c1); // ffffffff char c2 = 250; printf("%02x\n", c2); // fffffffa printf("heheda\n"); unsigned char c3 = -1; printf("%02x\n", c3); // ff unsigned char c4 = 250; prin转载 2021-05-16 20:52:31 · 296 阅读 · 0 评论 -
c语言一定从main函数开始执行吗?
快看这里转载 2021-02-02 22:58:08 · 1538 阅读 · 1 评论