Hi All,
I have doubt in strncmp.
consider the following prog:
int main()
{
int i;
i = strncmp("Nstrin g","Astring",6) ;
printf("%d", i);
}
Here o/p is 13, now if i modify the prog like:
i = strncmp("Nstris g","Astring",6) ; O/P is 5 why??
ok ok.. got it !! while typing the question i got the ANSWER.
it print the difference in the character.. Right?
I have doubt in strncmp.
consider the following prog:
int main()
{
int i;
i = strncmp("Nstrin g","Astring",6) ;
printf("%d", i);
}
Here o/p is 13, now if i modify the prog like:
i = strncmp("Nstris g","Astring",6) ; O/P is 5 why??
ok ok.. got it !! while typing the question i got the ANSWER.
it print the difference in the character.. Right?
Comment