title: Program Count Occurrence Given Character String
signature: fun programCountOccurrenceGivenCharacterString(s: String, c: Char): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(s: String, c: Char, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(s, c), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver("mhjnKfd", 'l', 0)
      println("TEST-0...${result}")
      
      result = driver("716662107", '6', 3)
      println("TEST-1...${result}")
      
      result = driver("01", '1', 1)
      println("TEST-2...${result}")
      
      result = driver("wPHSxIbnHakGRO", 'n', 1)
      println("TEST-3...${result}")
      
      result = driver("721106", '8', 0)
      println("TEST-4...${result}")
      
      result = driver("111", '0', 0)
      println("TEST-5...${result}")
      
      result = driver("TIBFU", 'Q', 0)
      println("TEST-6...${result}")
      
      result = driver("0", '3', 0)
      println("TEST-7...${result}")
      
      result = driver("10", '0', 1)
      println("TEST-8...${result}")
      
      result = driver("lqq", 'd', 0)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def program_count_occurrence_given_character_string(s, c):
      res = 0
      for i in range(len(s)):
          if (s[i] == c):
              res = (res + 1)
      return res
source_cpp: int program_count_occurrence_given_character_string(string s, char c) {
    int res = 0;
    for ( int i = 0;
    i < s . length ( );
    i ++ ) if ( s [ i ] == c ) res ++;
    return res;
  }