0
c++ program to print the words start with "h" in a given multi word text using getline() and write()
12 Respostas
+ 3
Good try, but
No, you shouldn't only check the first letter of the whole sentence.
You need to split the sentence into words.
Loop through the words, and check their first letter one by one.
Do not output those word without h as first letter.
+ 2
Please reply with one message, this isn't a chat board : )
Anyways, did you understand the hints given by my friend Gordon?
He had given you clear notes on what to do.
What part is hard on this task, can you tell?
+ 2
See this example about splitting string 👍
https://www.geeksforgeeks.org/tokenizing-a-string-cpp/
+ 1
Please tag C++ to improve context clarity 👍
0
Thank you dear
0
Could you say more about that
0
By using the loops how to split sentence into word
0
Can anyone reduce the size of the program
By different method or same method
The above program is accurate but size is more
0
Salam fatima
See this but i used string not array of char.
https://code.sololearn.com/cBSc5f5G74NC/?ref=app
0
Thank you rafik
Program is accurate and excellent
But using getline() and write() is necessary
0
Fatima
I don't use write() many times, I don't know if I can help you under such restriction. But if I found a way I will tell you here ...