摘要: 4 #include <ctype.h> int main() { FILE *file; int line_count = 0; int char_count = 0; int ch; int in_line = 0; file = fopen("data4.txt", "r"); if (fil 阅读全文
posted @ 2025-06-02 19:32 周丹婷 阅读(24) 评论(0) 推荐(0)
摘要: 4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; char name[80]; char author[80]; double sales_price; int sales_count; } Book; void ou 阅读全文
posted @ 2025-05-27 18:40 周丹婷 阅读(19) 评论(0) 推荐(0)
摘要: 1.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(int a 阅读全文
posted @ 2025-05-13 21:13 周丹婷 阅读(81) 评论(0) 推荐(0)
摘要: 1. #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; printf("sizeof(x) = %d\n", sizeof(x)); for (i = 0; i < N; 阅读全文
posted @ 2025-04-16 17:02 周丹婷 阅读(24) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to_grade(sc 阅读全文
posted @ 2025-04-03 21:27 周丹婷 阅读(23) 评论(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) { numbe 阅读全文
posted @ 2025-03-18 21:14 周丹婷 阅读(16) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/2005-z 阅读全文
posted @ 2025-03-16 17:55 周丹婷 阅读(14) 评论(0) 推荐(0)
摘要: 1.1 #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } 阅读全文
posted @ 2025-03-04 16:39 周丹婷 阅读(13) 评论(0) 推荐(0)