摘要: task1 // 将图书信息写入文本文件data1.txt // 再从文件中读取图书信息,打印输出到屏幕上,并显示行号 #include <stdio.h> #define N 80 #define M 100 typedef struct { char name[N]; // 书名 char au 阅读全文
posted @ 2024-06-18 20:53 裴锦阳 阅读(1) 评论(0) 推荐(0) 编辑
摘要: task1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组 阅读全文
posted @ 2024-06-10 19:28 裴锦阳 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验任务1-1 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出int 阅读全文
posted @ 2024-05-19 19:44 裴锦阳 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 实验任务一 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); void 阅读全文
posted @ 2024-04-24 20:26 裴锦阳 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); for(i=0;i<N;++i){ number=ra 阅读全文
posted @ 2024-04-15 08:46 裴锦阳 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验任务一 #include <stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); return 0;} #include <stdio.h> int main() { printf(" o \n"); p 阅读全文
posted @ 2024-03-31 22:18 裴锦阳 阅读(9) 评论(0) 推荐(0) 编辑