摘要: 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(p 阅读全文
posted @ 2022-06-13 15:24 旦增曲吉 阅读(20) 评论(0) 推荐(0)
摘要: task1-1 #include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 }Book; int main() { Book x[N] = { {"一九八 阅读全文
posted @ 2022-06-06 22:48 旦增曲吉 阅读(27) 评论(0) 推荐(0)
摘要: task1_1.c ① int型数组a数组a在内存中是连续存放的,每个元素占用4个内存字节单 ② char型数组b数组b在内存中是连续存放的,每个元素占用1个内存字节单元。 ③对应的值一样。 #include <stdio.h> #define N 4 int main() { int a[N] = 阅读全文
posted @ 2022-05-07 22:34 旦增曲吉 阅读(20) 评论(0) 推荐(0)
摘要: task1.c #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void printText(int line,int col, char text[]); void pri 阅读全文
posted @ 2022-04-22 21:55 旦增曲吉 阅读(25) 评论(1) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main() { int grade,number; int i; srand (time(0)); for (i=0;i<N;++i) { grade=ran 阅读全文
posted @ 2022-04-18 15:44 旦增曲吉 阅读(29) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); return 0; } task1-2.c #include<stdio.h> main() { printf(" o \t o \t\ 阅读全文
posted @ 2022-03-28 23:57 旦增曲吉 阅读(31) 评论(2) 推荐(0)