title: Program Count Occurrence Given Character String
signature: programCountOccurrenceGivenCharacterString(s, c) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(s, c, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s, c), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          "mhjnKfd", 'l', 
          0)
      }");
  
      print("TEST-1...${driver(
          "716662107", '6', 
          3)
      }");
  
      print("TEST-2...${driver(
          "01", '1', 
          1)
      }");
  
      print("TEST-3...${driver(
          "wPHSxIbnHakGRO", 'n', 
          1)
      }");
  
      print("TEST-4...${driver(
          "721106", '8', 
          0)
      }");
  
      print("TEST-5...${driver(
          "111", '0', 
          0)
      }");
  
      print("TEST-6...${driver(
          "TIBFU", 'Q', 
          0)
      }");
  
      print("TEST-7...${driver(
          "0", '3', 
          0)
      }");
  
      print("TEST-8...${driver(
          "10", '0', 
          1)
      }");
  
      print("TEST-9...${driver(
          "lqq", 'd', 
          0)
      }");
  
      return 0;
  }
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;
  }