![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习笔记
rooooo_
这个作者很懒,什么都没留下…
展开
-
实训笔记L5
文件基本操作 文件的输入输出 打开文件 fopen(文件名,使用方式); r:只读 w:只写,文件不存在则新建 a:追加 rb:二进制文件的只读 wb:二进制文件的只写 ab:二进制文件的追加 #include <stdio.h> #include <stdlib.h> int main() { FILE *file; if((file=fopen("file.txt","w"))==NULL){ printf("error");原创 2020-07-17 22:37:52 · 66 阅读 · 0 评论 -
实训笔记L4
结构体变量 初始化 自定义初始化 struct pstu{ int id; char name[20]; }stu[2]={1001,"mike",1002,"john"}; 输入初始化 #include<stdio.h> struct pstu{ int id; char name[20]; }stu[10]; int main() { int i; for(i=0;i<10;i++){ scanf("%d,%s",&am原创 2020-07-16 21:09:52 · 67 阅读 · 0 评论