Can someone show me a sample code in c which can read in a user inputted sentence/line and then split that line down by white spaces into separate words please? I shall worship you as my new God if someone out there can just show me a sample solution.
SIFA
0
Newbie Poster
Recommended Answers
Jump to PostPretty simple to code this up, why not try?
while there are more letters in the string take each letter and put it into a char words[50][50], incrementing j, unless it's a space or punctuation char. (use ctype.h and isalnum() ). In that case, increment i and …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.