Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language programming: use a pointer to input data into a plastic array A, and copy the data in array A to another array B! ! ! ! ! ! ! ! !
C language programming: use a pointer to input data into a plastic array A, and copy the data in array A to another array B! ! ! ! ! ! ! ! !
# include & ltiostream & gt

# Definition number 10

int main()

{

int a[n],b[n],I;

for(I = 0; I & ltn;; ++i)

scanf("%d ",& ampa[I]);

b[I]= a[I];

Returns 0;

}

I don't see the pointer to use.

# include & ltiostream & gt

# Definition number 10

int main()

{

int a[n],b[n],*p=a,*q=b,I;

for(I = 0; I & ltn;; ++i)

{

scanf("%d ",p);

* q++ = * p++;

}

Returns 0;

}