K&R C Programs Exercise 4-1
Exercise 4-1. Write the function strindex(s,t) that returns the position of the rightmost occurrence of t in s, or -1 if there is none. The K&R strindex in Section 4.1 returns the leftmost match by scanning left-to-right and returning at the first hit. For the rightmost match there are two symmetric approaches: scan right-to-left and …