#include <iostream>
#include <sstream>
#include <cstring>
#include <iterator>
#include <vector>
bool IsLower(char ch);
void GetLowercaseFirstLetterWords(char *s, char *clw);
int main()
{
char s[] = "C++ C c# Java php Go rust";
char words[256] = "";
GetLowercaseFirstLetterWords(s, words);
std::cout << words;
}
void GetLowercaseFirstLetterWords(char *s, char *words) {
std::vector<std::string> tokens;
std::istringstream iss(s);
copy(std::istream_iterator<std::string>(iss),
std::istream_iterator<std::string>(),
back_inserter(tokens));
for (auto word : tokens) {
if (IsLower(word[0])) {
strcat(strcat(words, word.c_str()), " ");
}
}
}
bool IsLower(char ch) {
if (ch >= 'a' && ch <= 'z') {
return true;
}
return false;
}
/*
run:
c# php rust
*/