#include <stdio.h>
#include <string.h>
#include <stdbool.h>
bool IsLower(char ch);
void GetLowercaseFirstLetterWords(char *s, char *words);
int main(void)
{
char s[] = "C C++ c# Java php Rust go";
char words[256] = "";
GetLowercaseFirstLetterWords(s, words);
puts(words);
return 0;
}
void GetLowercaseFirstLetterWords(char *s, char *words) {
char *p;
p = strtok (s, " ");
while (p != NULL) {
if (IsLower(p[0])) {
strcat(strcat(words, p), " ");
}
p = strtok (NULL, " ");
}
}
bool IsLower(char ch) {
if (ch >= 'a' && ch <= 'z')
return true;
return false;
}
/*
run:
c# php go
*/