Thread: Filters in C

  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    1

    Filters in C

    Hi everyone. I have some problems. I just start my work with C programming that’s why I have problem with creating even simply program. In next week I will have a exam and the teacher gives as to do a list of program which probably are similar to those on exam. Maybe someone can know how to do one of this program below?? This is the filters which I can later use it in CMD to filtering some .txt file.

    List:
    - Change all lowercase characters to uppercase characters and vice versa.
    - Calculate the number of all words starting with an uppercase character.
    - Change all characters to uppercase characters.
    - Select all lines shorter then n characters.
    - Select all lines with the number of characters from n to m.
    - Select all lines starting with a given character.
    - Select all lines starting with a given string.
    - Write a filter that displays the number of occurrences of characters 'a' 'b' 'c' 'd' and 'e' in the standard input.
    - Write a filter that displays the number of occurrences of all characters from the
    standard input.

    Please help me.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Start simple, say with the filter which does nothing except copy the input to the output.

    All the other ones would be based on that, and it's an easy one to get right from the beginning.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Spam Filters. ISP based email is dying.
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 03-05-2008, 12:05 PM
  2. Audio Filters
    By samGwilliam in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 07-08-2007, 01:41 PM
  3. Digital Filters
    By Shiro in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 01-19-2002, 01:18 PM