会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
江南王小帅
春风得意马蹄疾,一日看尽长安花
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
17
18
19
20
21
22
23
24
25
···
29
下一页
2021年9月10日
memcpy memmove memset
摘要: //memcpyint main01(){ const char str[50] = "www.google.com"; char dest[50]; //遇到不熟悉的函数,按F1看微软的帮助文档, //memcpy(dest, str, strlen(str)+1); //memcpy(dest,
阅读全文
posted @ 2021-09-10 08:56 江南王小帅
阅读(36)
评论(0)
推荐(0)
2021年9月8日
内存四区和函数调用模型
摘要: //栈区 stack 编译器自动分配释放,存放函数的参数值,局部变量值等,比较小,与数据结构中的栈相似//堆区 heap,有程序猿分配释放,程序结束后可能由OS回收,与数据结构是两回事//数据区 data , 主要包括静态全局区和常量区,而局部变量在栈区,要与之区分。//代码区 Code:存放函数体
阅读全文
posted @ 2021-09-08 11:31 江南王小帅
阅读(39)
评论(0)
推荐(0)
fseek 用法
摘要: #include<stdio.h>#include<string.h>#include <stdlib.h> #pragma warning(disable : 4996) struct Student{ char name[20]; int num; int age; float scor;};i
阅读全文
posted @ 2021-09-08 10:03 江南王小帅
阅读(321)
评论(0)
推荐(0)
fwrite和fread读写二进制文件
摘要: #include<stdio.h>#include<string.h>#include <stdlib.h> #pragma warning(disable : 4996) int main(){ int a[5]; int b[5]; int size = sizeof(int); FILE *f
阅读全文
posted @ 2021-09-08 09:19 江南王小帅
阅读(234)
评论(0)
推荐(0)
2021年9月7日
输入字符串写到文本
摘要: FILE *fp; char str[200] = { 0 }; char tmp[100]; fp = fopen("test.txt", "at+"); if (fp == NULL) { puts("文件打开失败\n"); } printf("请输入一个字符串\n"); gets(tmp);
阅读全文
posted @ 2021-09-07 15:45 江南王小帅
阅读(50)
评论(0)
推荐(0)
fgets fputs
摘要: //fgets fputs FILE *fp; char str[100]; fp = fopen("test.txt", "rt"); if (fp == NULL) { puts("文件读取失败\n"); exit(0); } while (fgets(str, 100, fp) != NULL
阅读全文
posted @ 2021-09-07 15:36 江南王小帅
阅读(36)
评论(0)
推荐(0)
文件操作
摘要: #include<stdio.h>#include<string.h>#include <stdlib.h> #pragma warning(disable : 4996) int main() { //写文件 /*FILE *fileP = NULL; fileP = fopen("test.tx
阅读全文
posted @ 2021-09-07 15:31 江南王小帅
阅读(27)
评论(0)
推荐(0)
动态内存管理malloc
摘要: #include<stdio.h>#include<string.h>#include <stdlib.h> #pragma warning(disable : 4996) //动态内存管理 //定义数组内存固定的,但是有时候数组不能确定个数,所以用动态内存 int main(int argc, c
阅读全文
posted @ 2021-09-07 11:48 江南王小帅
阅读(61)
评论(0)
推荐(0)
typedef的用法02
摘要: #include<stdio.h>#include<string.h> typedef struct Books { char title[10]; char bookname[10]; char author[20]; int bookID;}Book; int main(int argc, co
阅读全文
posted @ 2021-09-07 11:30 江南王小帅
阅读(31)
评论(0)
推荐(0)
typedef 用法
摘要: #include<stdio.h>#include<string.h>#pragma warning(disable : 4996) typedef unsigned char BYTE;typedef int INT; BYTE B1, B2; INT a, b;
阅读全文
posted @ 2021-09-07 11:28 江南王小帅
阅读(30)
评论(0)
推荐(0)
上一页
1
···
17
18
19
20
21
22
23
24
25
···
29
下一页
公告