摘要: #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=x;p<x+N;++p) pr 阅读全文
posted @ 2022-06-15 11:50 YH32602799 阅读(27) 评论(0) 推荐(0) 编辑
摘要: #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 23:03 YH32602799 阅读(24) 评论(1) 推荐(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)); printf("si 阅读全文
posted @ 2022-05-08 17:36 YH32602799 阅读(5) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> long fun(long s); int main() { long s,t; printf("Enter a number: "); while (scanf("%ld", &s)!=EOF) { t=fun(s); printf("new number i 阅读全文
posted @ 2022-04-25 14:23 YH32602799 阅读(18) 评论(2) 推荐(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++) { 阅读全文
posted @ 2022-04-18 16:11 YH32602799 阅读(260) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n\n"); printf(" o \n"); printf("<H>\n"); printf("I I\n"); return 0; } #in 阅读全文
posted @ 2022-03-27 23:36 YH32602799 阅读(23) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ char ch; ch = getchar(); putchar(ch); printf("%c",ch); return 0; } 阅读全文
posted @ 2022-03-22 21:00 YH32602799 阅读(23) 评论(1) 推荐(0) 编辑