摘要: task4 #include<stdio.h> int main() { char ch; FILE *fp; fp = fopen("data4.txt","r"); int count = 0; while(1) { ch = fgetc(fp); if(ch==EOF) break; if(c 阅读全文
posted @ 2023-12-20 13:14 胡彦超 阅读(19) 评论(0) 推荐(0)
摘要: task1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组 阅读全文
posted @ 2023-12-11 17:27 胡彦超 阅读(19) 评论(0) 推荐(0)
摘要: 任务1-1 //验证性实验:指针变量作为函数参数,指针变量作为函数的返回值 #include<stdio.h> #define N 5 void input(int x[],int n); void output(int x[],int n); void find_min_max(int x[],i 阅读全文
posted @ 2023-12-01 11:52 胡彦超 阅读(24) 评论(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类型数组a的每一个 阅读全文
posted @ 2023-11-16 20:05 胡彦超 阅读(20) 评论(0) 推荐(0)
摘要: 任务1 #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 @ 2023-11-04 17:20 胡彦超 阅读(24) 评论(0) 推荐(0)
摘要: 任务1 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand(time(0));//以 阅读全文
posted @ 2023-10-17 10:14 胡彦超 阅读(59) 评论(0) 推荐(0)
摘要: 试验任务1 #include<stdio.h> int main() { printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); return 0; } 阅读全文
posted @ 2023-10-04 11:20 胡彦超 阅读(29) 评论(0) 推荐(0)