How would u determine the end of a word using pointers?
samli88
0
Newbie Poster
Recommended Answers
Jump to PostHow would u determine the end of a word using pointers?
Here's an approach:
- First you read away all whitespaces.
- Then you read until you come across a non-alphabet character.
- Now you stop because you've reached the end of a word.
Jump to PostSolution:1
-------------
If you have strings consisting of many words like
"abc def xyz"
use strtok functions (space as a delimeter)
to get the words.
limitation:if multiple spaces occur like abc def xyz "
it wont work perfectly.
Solution:2
-------------
1)read the string charecter wise (one char at a time) …
All 7 Replies
mvmalderen
2,072
Postaholic
Dream2code
12
Junior Poster
mvmalderen
2,072
Postaholic
Dream2code
12
Junior Poster
mvmalderen
2,072
Postaholic
samli88
0
Newbie Poster
mvmalderen
2,072
Postaholic
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.