Strings

This is a discussion on Strings within the C Programming forums, part of the General Programming Boards category; 1. Reverse words in a string (words are separated by one or more spaces). Now do it in-place. 2. Strip ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    12

    Strings

    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

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >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.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    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?

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 03:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 08:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 07:37 AM
  4. damn strings
    By jmzl666 in forum C Programming
    Replies: 10
    Last Post: 06-24-2002, 03:09 AM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 12:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21