摘要: task.c // 文件读写操作:以字符、字符串形式读、写 #include <stdio.h> #define N 5 #define M 80 void write(); void read_str(); void read_char(); int main() { printf("测试1: 把 阅读全文
posted @ 2025-06-05 11:36 毛志威 阅读(24) 评论(0) 推荐(0)
摘要: task4 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double 阅读全文
posted @ 2025-05-28 22:19 毛志威 阅读(26) 评论(0) 推荐(0)
摘要: task1.1 #include <stdio.h> int main(int argc, char *argv[]) { int i; for(i = 1; i < argc; ++i) printf("hello, %s\n", argv[i]); return 0; } void func(i 阅读全文
posted @ 2025-05-14 19:24 毛志威 阅读(26) 评论(0) 推荐(0)
摘要: task1 代码 #include <stdio.h> #include<stdlib.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof( 阅读全文
posted @ 2025-04-20 23:46 毛志威 阅读(18) 评论(0) 推荐(0)
摘要: task1 代码 #include<stdio.h> char score_to_grade(int score); int main(){ int score; char grade; while(scanf("%d",&score)!=EOF){ grade=score_to_grade(sco 阅读全文
posted @ 2025-04-07 22:54 毛志威 阅读(17) 评论(0) 推荐(0)
摘要: task1 代码部分 #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 阅读全文
posted @ 2025-03-23 16:55 毛志威 阅读(24) 评论(0) 推荐(0)
摘要: task1.c 代码部分 #include<stdio.h> #include<stdlib.h> int main() { printf(" O O \n"); printf(" <H> <H> \n"); printf(" I I I I\n"); system("pause"); return 阅读全文
posted @ 2025-03-04 17:18 毛志威 阅读(21) 评论(0) 推荐(0)