#DailyChalenge #programming #PythonProgramming
The function/method customSplit accepts two arguments - str and delimiter. The character array str represents a string value and the delimiter represents a character.
The function/method customSplit must split the given string based on the given delimiter. Then the function must return an array of string values containing the words after splitting the given string.
Your task is to implement the function customSplit so that the program runs successfully.
Note: At least one character other than the delimiter is always present in the given string.
The following structure is used to represent the boundedArray and is already defined in the default code (Do not write this definition again in your code).
typedef struct BoundedArray(
int SIZE;
char **words;
) boundedArray;
IMPORTANT: Do not write the main() function as it is already defined.
Example Input/Output 1:
Input:
codeblocks o
Output:
Words:
c
debl
cks
Explanation: The given string is codeblocks and the delimiter is o.
After splitting the string based on the delimiter, the words are
c
debl
cks
Example Input/Output 2:
Input:
lllskillracklll l
Output:
Words:
ski
rack