n and n1 are used to check for substring without considering the case of the letters in w by comparing the difference of ASCII values
int n , n1 ; char ch = w [ i ] ; char ch1 = s [ index ] [ i - position ] ; if ( ch >= ' a ' && ch <= ' z ' ) n = ch - ' a ' ; else n = ch - ' A ' ; if ( ch1 >= ' a ' && ch1 <= ' z ' ) n1 = ch1 - ' a ' ; else n1 = ch1 - ' A ' ; if ( n != n1 ) same = false ; }