//this is a program to accept the values of array a and b and add them and store in c
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[4],b[4],c[4];
printf("\n\nEnter the value of Array A: ");
for(i=0;i<4;i++)
{
printf("\n\nEnter Number: ");
scanf("%d",&a[i]);
}
printf("\n\nEnter the value of Array B: ");
for(i=0;i<4;i++)
{
printf("\n\nEnter Number: ");
scanf("%d",&b[i]);
}
printf("\n\nPrinting the values of Array C: \n\n");
for(i=0;i<4;i++)
{
c[i]=a[i]+b[i];
printf(" %d ",c[i]);
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[4],b[4],c[4];
printf("\n\nEnter the value of Array A: ");
for(i=0;i<4;i++)
{
printf("\n\nEnter Number: ");
scanf("%d",&a[i]);
}
printf("\n\nEnter the value of Array B: ");
for(i=0;i<4;i++)
{
printf("\n\nEnter Number: ");
scanf("%d",&b[i]);
}
printf("\n\nPrinting the values of Array C: \n\n");
for(i=0;i<4;i++)
{
c[i]=a[i]+b[i];
printf(" %d ",c[i]);
}
getch();
}