If " geek " and " keeg " are both present in s without over - lapping and " keeg " starts after " geek " ends
if ( ( p = strstr ( s , " geek " ) ) && ( strstr ( p + 4 , " keeg " ) ) ) return true ; return false ; }