for example suppose that some k
which is arbitrary number=2 k=2
then there is code in c
int wordcomp(char *p, char *q) {
int n = k;
for ( ; *p == *q ; p++, q++) {
if ( *p==0 && --n == 0 )
return 0;
}
return *p - *q;
}
please explain me what does this code do? also what means *p-*q
?and also how implement it in java?