
November 8th, 2012, 01:37 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 4
Time spent in forums: 1 h 55 m 20 sec
Reputation Power: 0
|
|
|
C programming: User key in search word, print all matching data.
Dear all,
Hope someone could teach me on how to code: when user input search word, the output will print out all matching data.
In a list of data (example 40 string text data)
Example {Testing 1, Testing 2, Friend 3, Friend 4, Max 5, Max 6, ....., rubbish 40}
when a user input a search text --> "Testing"
Output should shown matching data: Testing 1 & Testing 2.
i tried using "for" loop. but instead of printing "Testing 1 & Testing2", the output keep printing "Testing 1". (sorry i do not have the code with me now).
could some1 please enlighten me with some code to search the user input in a list of text and print out all match data?
thanks 
|