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;}…
#include <stdio.h> int main(){ char cArr[]={'I','L','O','V','E','C'}; char sArr[]="ilovec"; int i=sizeof(cArr); int j=sizeof(sArr); printf("字符数组的长度是:%d,字符串的长度是:%d",i,j); return 0;}…
开关语句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(…