C Program To Compare Numbers

How to write a C Program To Compare Numbers in C Programming Language ?


Solution -

int compareNumbers(int arr1[], int arr2[])
{
int i = 0, res = 0;
while(i < {ARRAYS_LENGTH} && !res)
{
res = arr1[i] - arr2[i];
i++;
}
return res;
}

Tags: Compare Number in C Program, c program string compare, c program to compare two strings
c program to compare two strings using strcmp, c program to compare two strings using pointers, c program to compare two strings without using built in function, c program to compare two strings without using library function, c program to compare two strings without using strcpy, c program to compare two files.


Learn More :