摘要: // 将图书信息写入文本文件data1.txt #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 7 #define M 80 typedef struct { char name[M]; // 书名 char author[M 阅读全文
posted @ 2022-12-24 16:51 小吉祥草王 阅读(41) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> #define N 3 typedef struct student { int id; char name[20]; char subject[20]; d 阅读全文
posted @ 2022-12-24 16:41 小吉祥草王 阅读(25) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 4 int main() { int a[N] = { 1, 9, 8, 4 }; char b[N] = { '1', '9', '8', '4' }; int i; printf("sizeof(int) = %d\n", sizeof( 阅读全文
posted @ 2022-11-23 17:26 小吉祥草王 阅读(24) 评论(1) 推荐(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 @ 2022-11-03 20:31 小吉祥草王 阅读(44) 评论(1) 推荐(0)
摘要: #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 < 阅读全文
posted @ 2022-10-20 14:25 小吉祥草王 阅读(48) 评论(3) 推荐(0)
摘要: // 打印一个字符小人 #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"); retu 阅读全文
posted @ 2022-10-13 12:18 小吉祥草王 阅读(52) 评论(2) 推荐(1)
摘要: 阅读全文
posted @ 2022-10-12 21:35 小吉祥草王 阅读(40) 评论(0) 推荐(0)