So I studied that strcmp returns the difference between the asci value of the two characters being compared. But in my case it is giving a value of -1,0 or 1 only.
#include<stdio.h>
#include<strings.h>
int main()
{
char n1[]="Jerry";
char n2[]="Ferry";
printf("%d",strcmp(n2,n1));
return 0;
}
Ideally it should give -4,but dev cpp is giving an output of -1. Why is that?