C基础-指针和数组等价转换

void foo(int *p,int n)
{
    int i;
    for(i=0;i<n;i++)
    {
        printf("%d
",p[i]);
        //printf("%d
",*(p+i));
    }
}

void main()
{
    int a[10];
    foo(a,10);
    system("pause");
}
原文地址:https://www.cnblogs.com/zhuyaguang/p/4820974.html