text: Driver code
code: public static void Main ( ) { string str = " abbcaceghcak " ; int n = str . Length ; char x = ' a ' , y = ' c ' ; Console . Write ( " Count ▁ = ▁ " + countSubstr ( str , n , x , y ) ) ; } }