上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: #include<stdio.h>void swap1(int x,int y),swap2(int *px,int *py),swap3(int *px,int *py);int main(){ int a=1,b=2; int *pa=&a,*pb=&b; swap1(a,b); printf( 阅读全文
posted @ 2025-01-02 16:05 Grit_Doyle 阅读(45) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int a[2],*p,*q; p=&a[0]; q=p+1; printf("%d\n",q); printf("%d\n",p); printf("%d\n",q-p); printf("%d\n",*q-*p); return 0;} 阅读全文
posted @ 2025-01-02 16:05 Grit_Doyle 阅读(11) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int a=3,*p; p=&a; printf("a=%d,*p=%d\n",a,*p);//a=3,*p=3 *p=10; printf("a=%d,*p=%d\n",a,*p);//a=10,*p=10 printf("Enter a: 阅读全文
posted @ 2025-01-02 16:04 Grit_Doyle 阅读(13) 评论(0) 推荐(0)
摘要: #include<stdio.h>void month_day(int year,int yearday,int*pmonth,int *pday);int main(){ int day,month,year,yearday; printf("input year and yearday:"); 阅读全文
posted @ 2025-01-02 16:04 Grit_Doyle 阅读(15) 评论(0) 推荐(0)
摘要: #include<stdio.h>void bubble(int a[],int n);int main(){ int n,a[8]; int i; printf("Enter n (n<=8):"); scanf("%d",&n); printf("Enter a[%d]:",n); for(i= 阅读全文
posted @ 2025-01-02 16:04 Grit_Doyle 阅读(10) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int x=5342; int *p=NULL; p=&x; printf("If I know the name of variable,I can get it's value by name:%d\n",x); printf("If I 阅读全文
posted @ 2025-01-02 16:03 Grit_Doyle 阅读(62) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int x,y; int *px,*py; x=1;y=2; px=&x;py=&y; printf("x=%d,y=%d,px=%d,py=%d,*px=%d,*py=%d\n",x,y,px,py,*px,*py); px++;//等同于 阅读全文
posted @ 2025-01-02 16:03 Grit_Doyle 阅读(12) 评论(0) 推荐(0)
摘要: #include<stdio.h>int day_of_year(int year,int mouth,int day);int main(){ int year,mouth,day,date; printf("输入年月日:"); scanf("%d%d%d",&year,&mouth,&day); 阅读全文
posted @ 2025-01-02 16:02 Grit_Doyle 阅读(14) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,index,n; int a[10]; printf("Enter n:"); scanf("%d",&n); printf("Enter %d integers:",n); for(i=0;i<n;i++){ scanf("%d 阅读全文
posted @ 2025-01-02 16:02 Grit_Doyle 阅读(24) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,flag,x; int a[5]; printf("Enter 5 integers:"); for(i=0;i<5;i++){ scanf("%d",&a[i]); } printf("Enter x:"); scanf("%d 阅读全文
posted @ 2025-01-02 16:01 Grit_Doyle 阅读(16) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页