摘要: 1. 实验任务1 /* // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 7 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 } Book; int 阅读全文
posted @ 2022-12-27 23:04 mli_littlewith 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 1. 实验任务1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这 阅读全文
posted @ 2022-12-27 10:51 mli_littlewith 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 1. 实验任务1 task1 实验代码以及运行效果截图 /* //① int型数组a,在内存中是否是连续存放的?每个元素占用几个内存字节单元? 是连续存放的占用4个字节 //② char型数组b,在内存中是否是连续存放的?每个元素占用几个内存字节单元? 是连续存放的占用1个字节 //③ 数组名a对应 阅读全文
posted @ 2022-11-24 16:16 mli_littlewith 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1. 实验任务1 //运行下列程序,观察程序功能,体会用函数模块组织代码的好处 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int 阅读全文
posted @ 2022-11-02 17:37 mli_littlewith 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1试验任务一 (1)task1.c源代码,及,运行结果截图 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); // 阅读全文
posted @ 2022-10-19 14:33 mli_littlewith 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1.试验任务1 (1)在垂直方向上打印两个字符小人的源代码,以及运行结果截图 \\在垂直方向上打印两个字符小人 #include<stdio.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); printf("\n\n" 阅读全文
posted @ 2022-10-12 20:18 mli_littlewith 阅读(36) 评论(0) 推荐(0) 编辑