Two libraries are included in the repo:
Param | Link | |
---|---|---|
countUpperCases | char* string | countUpperCases |
countWords | char* string | countWords |
mostLetter | char* string | mostLetter |
This function counts the uppercase letters.
Input: The function requires a string to work Output: The output is an integer
char b[255] = "Hello World";
printf("%c", countUpperCases(b)); // 2
This function counts the number of words in the input string.
Input: The function requires a string to work Output: The output is an integer
char b[255] = "Nessie's are cute;
printf("%c", countWords(b)); // 3
This function returns a struct containing information about the most common letter in the string.
Input: The function requires a string to work Output: The output is a struct mostLetter
//Output of the function
typedef struct {
char letter;
int size;
} Letter;
char b[255] = "Nessie's are cute";
printf("%c", mostLetter(b)->letter); // e
printf("%d", mostLetter(b)->size); // 4