C # program for the above approach
using System ; class GFG { static int freqCount ( String str , char k ) { int count = 0 ; for ( int i = 0 ; i < str . Length ; i ++ ) { if ( str [ i ] == k ) count ++ ; } return count ; }