Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
StrTok
//g++ 7.4.0 ////////////////////////////////////////////////////////////////////////////////StrTok:word count with strtok() //this code is created by Rezaul Hoque on July 09,2022; //contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; ///////////////////////////////////////////////////////////////////////////// #include <iostream> #include <string.h> int main() { char a[]="Hurray! Hurray! It's a holy, holiday."; int count=0; char* p=strtok(a," !',."); while(p!=NULL) { std::cout<<p<<"\n"; p=strtok(NULL," !',."); count++; } std::cout<<"There are "<<count<<" words "; return 0; }
run
|
edit
|
history
|
help
0
SFML ANIMATOR
RegTokIt
Get all anagrams from given words
Zahra_matrix
simple serialization
Reminder
MapTel2
Finalproject
OTHER - Two robots
https://codeforces.com/contest/449/problem/D (INCLuSION EXCLUSION principle)