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(…
上机练习:容器类型操作〉 列表.元组基本操作+, *, len(), [], in Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. &…