#include<stdio.h>
#include<conio.h>
void input(int[],int);
void display(int[],int);
void sum(int[],int[],int[],int);
void main()
{
int arr1[10],arr2[10],arr3[10];
int n;
clrscr();
printf("\nEnter the size=");
scanf("%d",&n);
printf("\nEnter element in first array");
input(arr1,n);
printf("\nEnter element in second array");
input(arr2,n);
printf("\nFirst array");
display(arr1,n);
printf("\nSecond array");
display(arr2,n);
printf("\nThe sum of two array is=");
sum(arr1,arr2,arr3,n);
display(arr3,n);
getch();
}
void input(int arr[],int n)
{
int i;
for(i=0;i<n;i++)
{
printf("\nEnter element=");
scanf("%d",&arr[i]);
}
}
void display(int arr[],int n)
{
int i;
printf("\nThe array is=");
for(i=0;i<n;i++)
{
printf("\n%d",arr[i]);
}
}
void sum(int arr1[],int arr2[],int arr3[],int n)
{
int i;
for(i=0;i<n;i++)
{
arr3[i]=arr1[i]+arr2[i];
}
}


We also provide the on demand projects, which can be domestic or commercial.
To get your project completely according to your requirements, contact us at knowledgeforyou2022@gmail.com

Leave a Reply

Your email address will not be published.