摘要: task1-1 #include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for(i=0; i<N; ++i) printf("%d", x[ 阅读全文
posted @ 2022-06-14 10:36 无边低柳 阅读(8) 评论(0) 推荐(0)
摘要: TASK1 #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 18:13 无边低柳 阅读(29) 评论(0) 推荐(0)
摘要: task1-1 #include <stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 2}; char b[N] = {'2', '0', '2', '2'}; int i; printf("sizeof(int) = %d\n", siz 阅读全文
posted @ 2022-05-08 20:21 无边低柳 阅读(20) 评论(0) 推荐(0)
摘要: task1 #include<stdio.h> #include<stdlib.h> #include<time.h> #include <iostream> #include <unistd.h> #define N 80 void printText(int line,int col,char 阅读全文
posted @ 2022-04-23 19:20 无边低柳 阅读(40) 评论(0) 推荐(0)
摘要: task1#include <iostream> #include <stdlib.h> #include <time.h> #define N 5 int main(int argc, const char * argv[]) { int grade,number; int i; srand(ti 阅读全文
posted @ 2022-04-16 22:23 无边低柳 阅读(12) 评论(0) 推荐(0)