初识指针,编译之后的warning怎么回事?
#include <stdio.h>int swap(int a[]);
int main()
{
int a[]={0,2,4,6,8,10};
int t=sizeof(a)/sizeof(a[0]);
printf("sizeof(a)/sizeof(a[0])=%d;\n a[0]=%d,a[%d]=%d;\n\n",sizeof(a)/sizeof(a[0]),a[0],t-1,a[t-1]);
swap(&a);
printf("after swaping...\n\nsizeof(a)/sizeof(a[0])=%d;\n a[0]=%d,a[%d]=%d;\n\n",sizeof(a)/sizeof(a[0]),a[0],t-1,a[t-1]);
system("pause");
return 0;
}
int swap(int a[])
{
int t;
t=a[0];
a[0]=a[5];
a[5]=t;
}