摘要: #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]); pri 阅读全文
posted @ 2022-06-13 20:29 陈乔胜 阅读(9) 评论(0) 推荐(0)
摘要: //1_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:53 陈乔胜 阅读(19) 评论(0) 推荐(0)
摘要: #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", sizeof(int)); pri 阅读全文
posted @ 2022-05-07 20:48 陈乔胜 阅读(20) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void printText(int line, int col, char text[]); // 函数声明 voi 阅读全文
posted @ 2022-04-25 13:23 陈乔胜 阅读(28) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>#include <time.h>#define N 5int main(){int grade, number;int i;srand(time(0)); // 以当前系统时间作为随机种子for(i=0; i<N; ++i) 阅读全文
posted @ 2022-04-18 15:39 陈乔胜 阅读(37) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { printf(" o \n"); printf(" <H>\n"); printf(" [ ]\n"); printf("\n"); printf(" o \n"); printf(" <H>\n"); printf(" [ ]\n"); 阅读全文
posted @ 2022-03-26 17:12 陈乔胜 阅读(120) 评论(3) 推荐(0)