i want to fill the static values of the array into another array,its working fine,just want to know ,is this is right or any other method for copying the arrays..
Code:
#include<stdio.h>
#define SIZE 1024
int main()
{
int array[SIZE];
int array1[] = { 10,20,7,8,4,5,3,2,21,6,7,5,3,2,2,2,4,5,67,8,9,6,64,5,4,3,2,2,2,2,2};
int i;
printf("\n The Array values are \n");
copy_array(&array,&array1);
for(i = 0;i<SIZE;i++)
printf("%d ",array[i]);
for(i = 0;i<32;i++)
printf("\n\n\n%d ",array1);
}
copy_array(int *array,int *array1)
{
int i;
for(i = 0;i<32;i++)
{
array[i]= array1;
}
for(i = 0;i<1024;i++)
printf("%d ",array[i]);
for(i = 0;i<32;i++)
printf("\n\n\n%d ",array1);
}