摘要: 1.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[i]); p 阅读全文
posted @ 2022-06-13 17:17 kowo 阅读(25) 评论(0) 推荐(0)
摘要: #include <stdio.h>#define N 5#define M 80typedef struct{char name[M]; // 书名char author[M]; // 作者}Book;int main(){Book x[N] = { {"一九八四", "乔治.奥威尔"}, {"美 阅读全文
posted @ 2022-06-06 22:23 kowo 阅读(50) 评论(1) 推荐(0)
摘要: #include <stdio.h>#define N 4int main(){ int a[N] = {2, 0, 2, 2}; char b[N] = {'2', '0', '2', '2'}; int i; printf("sizeof(int) = %d\n", sizeof(int)); 阅读全文
posted @ 2022-05-06 16:00 kowo 阅读(27) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h>#include<stdlib.h>#include<time.h>#include<windows.h>#define N 80 void printText(int line,int col, char text[]);void printSpaces(in 阅读全文
posted @ 2022-04-21 19:25 kowo 阅读(48) 评论(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 阅读全文
posted @ 2022-04-14 20:58 kowo 阅读(56) 评论(2) 推荐(0)
摘要: #include <stdio.h> int main() { printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); return 0; } #inc 阅读全文
posted @ 2022-03-29 17:08 kowo 阅读(28) 评论(1) 推荐(0)