#include
void main()
{
int a[]={1,2,3};
int b[]={4,5,6};
int i,j;
int *p=a,*q=b;
void fun(int arr[],int brr[]);
fun(a,b);
printf("please output the numbers\n");
for(i=0;i
printf("%d\t",*p);
}
printf("\n");
for(j=0;j
printf("%d\t",*q);
void fun(int arr[],int brr[])
int a,i;
a=*arr;
*arr=*brr;
*brr=a;
而且既然是輸出,所以個人覺得還是這樣的輸出更好些哈!
#include
void main()
{
int a[]={1,2,3};
int b[]={4,5,6};
int i,j;
int *p=a,*q=b;
void fun(int arr[],int brr[]);
fun(a,b);
printf("please output the numbers\n");
for(i=0;i
{
printf("%d\t",*p);
}
printf("\n");
for(j=0;j
{
printf("%d\t",*q);
}
printf("\n");
}
void fun(int arr[],int brr[])
{
int a,i;
for(i=0;i
{
a=*arr;
*arr=*brr;
*brr=a;
}
}
而且既然是輸出,所以個人覺得還是這樣的輸出更好些哈!