1. Reverse words in a string (words are separated by one or more spaces). Now do it in-place.
2. Strip whitespace from a string in-place
Can anyone post more interesting and challenging questions on arrays, strings, pointers etc.
thanx
krithi
1. Reverse words in a string (words are separated by one or more spaces). Now do it in-place.
2. Strip whitespace from a string in-place
Can anyone post more interesting and challenging questions on arrays, strings, pointers etc.
thanx
krithi
>Can anyone post more interesting and challenging questions on arrays, strings, pointers etc.
Perform metacharacter pattern matching on a string.
-Prelude
My best code is written with the delete key.
What does that mean prelude?
I wrote a program that takes a dictionary file and a string and finds all the words in the dictionary file that fit teh same pattern of the input string. Is that what you are talking about?
>What does that mean prelude?
Basically, a regular expression program. For example, the user enters
$ prog "^\d+:" file.txt
The program would then print every line in file.txt that begins with any number of digits followed by a colon.
-Prelude
My best code is written with the delete key.