Answer-
#include <stdio.h>
void main()
{
int arr1[100], arr2[100];
int i, n;
printf("\n Copy the items of one array into another array :\n");
printf("----------------------------------------------------\n");
printf("Input the number of items to be stored in the array :");
scanf("%d",&n);
printf("Input %d items in the array :\n",n);
for(i=0;i<n;i++)
{
printf("enter item - %d : ",i);
scanf("%d",&arr1[i]);
}
/* Copy the elements of first array into second array.*/
for(i=0; i<n; i++)
{
arr2[i] = arr1[i];
}
/* Prints the items of first array */
printf("\nThe items stored in the first array are :\n");
for(i=0; i<n; i++)
{
printf("%d", arr1[i]);
}
/* Prints the items copied into the second array. */
printf("\n\nThe items copied into the second array are :\n");
for(i=0; i<n; i++)
{
printf("% d", arr2[i]);
}
printf("\n\n");
}