STRING WINDOW by 2 loop error

question = https://hack.codingblocks.com/contests/c/452/1665
solution = https://ide.codingblocks.com/#/s/22817