v
#include<stdio.h> void fun(int *p) { int i; for(i=0;i<10;i++) printf("%d\n",*(p+i)); } int main() { int a[10]={0,1,2,3,4,5,6,7,8,9}; int *p; p=a; fun(p); }
复制代码
运行结果: 1 3 5 7 9
-------------------------------- Process exited after 0.1473 seconds with return value 0 请按任意键继续. . .
我的码云账号是[email protected]
时间: 2024-09-30 22:55:50