摘要: #define _CRT_SECURE_NO_WARNINGS#include<stdio.h> int main(){ FILE* fp; fp = fopen("data4.txt", "r"); if (fp == NULL) { printf("fail to open\n"); retur 阅读全文
posted @ 2023-06-13 16:21 UNSCcruiser117 阅读(7) 评论(0) 推荐(0) 编辑
摘要: task4 #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include<string.h>#define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 阅读全文
posted @ 2023-05-30 16:17 UNSCcruiser117 阅读(21) 评论(0) 推荐(0) 编辑
摘要: task1_1 #include<stdio.h>#define N 4 int main(){ int x[N] = { 1,9,8,4 }; int i; int *p; for (i = 0; i < N; ++i) printf("%d", x[i]); printf("\n"); for 阅读全文
posted @ 2023-05-09 17:13 UNSCcruiser117 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1.1 1)是,占用4字节2)是,占用1字节3)都是一样的1.2 1)是,占用4字节2)是的3)是的,占用1字节4)是的5)与a[0][0],a[1][0],b[0][0]和b[1][0]的地址相同 #include<stdio.h>#define N 4 int main(){ int a[N] 阅读全文
posted @ 2023-04-17 22:04 UNSCcruiser117 阅读(8) 评论(0) 推荐(0) 编辑
摘要: task1 #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 print_sp 阅读全文
posted @ 2023-04-05 19:03 UNSCcruiser117 阅读(7) 评论(0) 推荐(0) 编辑
摘要: task 1 #include<stdio.h>#include<stdlib.h>#include<time.h> #define N 5#define R1 586#define R2 701 int main(){ int number; int i; srand(time(0)); for 阅读全文
posted @ 2023-03-19 16:57 UNSCcruiser117 阅读(14) 评论(0) 推荐(0) 编辑
摘要: TASK 1 #include <stdio.h>int main(){ printf(" o o\n"); printf("<H> <H>\n"); printf("I I I I\n"); return 0 ;} #include <stdio.h>int main(){ printf(" o\ 阅读全文
posted @ 2023-03-07 17:02 UNSCcruiser117 阅读(13) 评论(0) 推荐(0) 编辑