wap to copy array 1 into array 2.

 


#include<stdio.h>
#include<conio.h>
 main ()
{
   int a[100],i,n,b[100] ;
   
   printf("enter the size of an array : ");
   scanf("%d",&n);
   printf("elements of array is \n");


  for (i=0;i<n;i++)
   {
     scanf("%d",&a[i]);
   }
     printf("after copying array");

    for (i=0;i<n;i++)
   {
    b[i]=a[i];

     printf(" %d",b[i]);
   }



   }

output ;
enter the size of an array : 6 elements of array is 1 2 3 4 5 6 after copying array 1 2 3 4 5 6


Comments