Write a function with the function prototype of
int compare(double a[], double b[], int npts);
It will compare values in two arrays of the same size. If the corresponding values in each element of the
two arrays are the same, the function returns 1. Otherwise, it returns 0. Test the function with function calls
compare(a, a, 4) and compare(a, b, 4) with the arrays a = [1, 2, 3, 4], b = [1, 3, 4, 5].
I have directly wrote like this
#include <stdio.h>
void main()int result ;
{
int a[] = { 1, 1, 3, 4 };
int b[] = { 1, 2, 3, 3 };
int i;
for (i = 0; i < 4; i++)
if (a[i] != b[i])
{printf(" 0 ");
}
else
{printf(" 1 ");}
}}
So please help me to restart and re-build the program acc to requirement
Cheers thanks