c - Can we include "strcmp" in printf statement? -
can explain meaning of line of code
printf("%d",strcmp("strcmp()","strcmp()"))
the code joke...
it compares 2 fixed strings. make confusing 2 strings contain name of library function (strcmp) - of cause - doesn't make function call.
the code
printf("%d",strcmp("strcmp()","strcmp()"))
is similar to
printf("%d",strcmp("a","a"))
it print 0
(zero) strings identical , strcmp
return 0 when strings have exact compare.
Comments
Post a Comment