find the error
#include <stdio.h >
main ()
{
int a [50],b[50],c [50],n;
printf ("How many number you want to store in a single array \n");
scanf ("%d ",&n);
printf ("Now enter %d element of first array one by one \n",n);
for (int i =0;i<=n;i++)
scanf ("%d",&a [i]);
printf ("Now enter %d element of second array one by one \n",n);
for (int j =0;j <=n;j++)
scanf ("%d",&b [j]);
printf ("Addition of first and second array is given below \n");
for (int k=0;k <n;k++)
{
c [k]=a [k]+b [k];
print f ("%d",c [k];
}
}
Answers
Answered by
2
f not declared
when i or j is equal to zero then in test condition it should be less than n but not equal to n
in last line the corrected statement should be print f ("%d",c[k]);
hope so it may help you
please mark me as the Brainliest answer
Similar questions