I was looking through the code for the strstr function.
I understood all of it except this part:
return (char *) s1;
Wouldnt there be a way to do a similar function without using memcmp? How would it look then?
Thank you. To be precise I'm interested in how would I avoid using memcmp to write a function like strstr.