473,388 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

My question is that HowCanISeperateThisSentence into words in C?

as it writes in the title how can seperate a sentence like that (AhmetAliMehmet) into those words first = Ahmet, second = Ali, third = Mehmet,. I know that we have use string.h library and the function that copy a string strcpy.

Thank you for ur attention.
Mar 25 '10 #1
3 1279
weaknessforcats
9,208 Expert Mod 8TB
Each word starts with a captial letter. So the word extends from there until one position less than tghe next captial letter. Use strncpy to copy out that range.

Be sure to factor in the end of the string as a capital letter so you can get the last word.

Method B:

copy out letter one at time until you reach another capital letter or end of string. Whe you do, terminate the current word and start a new one.
Mar 25 '10 #2
thank you so much, i'll try in a short time and i'll let you know if i achieve it.
Mar 25 '10 #3
i'd like to say thank you again weaknessforcats. it works. Be good thick.
Mar 28 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: superprad | last post by:
"X-No-Archive: yes" what I am looking for is 1. To create a list of different words of various lengths(1-15) using A-Z,a-z,0-9 and punctuations.Basically anything that could be found on a...
2
by: CV | last post by:
How can I match 'n' number of neighbouring words of a pattern using regular expressions? For example, suppose I am looking for the pattern "length xyz cm" in some text. where xyz is a number -...
8
by: Rick | last post by:
I have a program that reads from a file. In the file are a series of words. I read in all the words into a string array, find the average length, count the number of words, display the longest...
7
by: Sling | last post by:
I code in Rexx on the mainframe which has 2 built-in functions: word(s,i) & words(s). word(s,i) returns the ith word in the s(tring), and words(s) returns the number of words within the s(tring)....
7
by: Jim Carlock | last post by:
Looking for suggestions on how to handle bad words that might get passed in through $_GET variables. My first thoughts included using str_replace() to strip out such content, but then one ends...
7
by: abraxas | last post by:
Ok maybe someone here can help me. I have been learning c++ and have been toying with some basic programming and have run into something that I would have assumed would have been fairly easy. I...
7
by: Jay | last post by:
How would I be able to grab random words from an internet source. I'd like to grab a random word from a comprehensive internet dictionary. What would be the best source and the best way to go...
20
by: dmurray14 | last post by:
Hey guys, I'm a C++ newbie here - I've messed with VB, but I mostly stick to web languages, so I find C++ to be very confusing at times. Basically, I am trying to import a text file, but I want...
6
by: Xernoth | last post by:
Hi, I have an exercise that requests the following: Write a function that reads words from an input stream and stores them in a vector. Use that function both to write programs that count the...
14
bugboy
by: bugboy | last post by:
I'm a beginner at this and am confused... I have three tables: 1. words / wordpk, word 2. definitions / definitionspk and definition 3. associations / wordpk, definitionspk 'words' holds...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.