code: https://github.com/lujinjianst/myNCCL/blob/master/exercise/exercise-12.3.c
computational results :
[haoyue@centos exercise]$ ./a.out
input string s1 and s2:
hello
helloworld
helloworld is not in hello
[haoyue@centos exercise]$ ./a.out
input string s1 and s2:
world hello
hello
hello is in world hello ,the first position 6
[haoyue@centos exercise]$ ./a.out
input string s1 and s2:
helloworldhello
hello
hello is in helloworldhello ,the first position 0
以上程序存在一些弊端,大家可以进一步研究。。。