摘要: #include<stdio.h> int main() { int s = 0; char ch; FILE* fp = fopen("data4.txt", "r"); if (fp == NULL) { printf("fail to open file\n"); return 1; } wh 阅读全文
posted @ 2023-12-20 15:36 2凯里 阅读(17) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 int sal 阅读全文
posted @ 2023-12-12 14:38 2凯里 阅读(15) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int *pmax); int m 阅读全文
posted @ 2023-12-03 13:30 2凯里 阅读(15) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 4 void test1() { int a[N] = { 1, 9, 8, 4 }; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = % 阅读全文
posted @ 2023-11-19 16:17 2凯里 阅读(12) 评论(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[]); // 函数声明 vo 阅读全文
posted @ 2023-11-03 18:52 2凯里 阅读(5) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-10-22 14:55 2凯里 阅读(10) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-10-07 13:10 2凯里 阅读(9) 评论(0) 推荐(0)