开关语句switch(变量) switch(weekday) ↓ 数字 default:异常处理 case-break #include <stdio.h> int main() { int weekday=3; switch(weekday) { case 1: printf("today is Monday\n"); break; case 2: printf("today is Tuesday\n"); break; case 3: printf(…
int a[5],*p=a; int a[5],*p=&a[0]; #include <stdio.h> int main(void){ int a[5],*p=a,i; for(i=0;i<5;i++) { *p=1; p++; }p=p-5;for(i=0;i<5;i++,p++)printf("%d\n",*p);return 0;}…