Counting uppercase and lowercase letters in a text

This is a discussion on Counting uppercase and lowercase letters in a text within the C Programming forums, part of the General Programming Boards category; Can anyone help me to count the uppercase and lowercase letters in a text?...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    11

    Unhappy Counting uppercase and lowercase letters in a text

    Can anyone help me to count the uppercase and lowercase letters in a text?

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Post the code you have so far. Tell us where you are stuck.
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Use isupper() and islower() from ctype.h to check if the character is uppercase or lowercase.

    Hint: You'll probably have to loop through each character

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to detect a lowercase or uppercase char?
    By Axel in forum C Programming
    Replies: 5
    Last Post: 09-04-2005, 12:28 PM
  2. Uppercase and lowercase
    By StarOrbs in forum C++ Programming
    Replies: 4
    Last Post: 03-09-2005, 03:18 PM
  3. Replies: 14
    Last Post: 06-06-2004, 03:51 PM
  4. Uppercase & Lowercase
    By Dennis in forum C Programming
    Replies: 2
    Last Post: 11-14-2002, 07:07 AM
  5. C++ newbie..convert string from lowercase to uppercase
    By wireless in forum C++ Programming
    Replies: 5
    Last Post: 02-25-2002, 07:49 PM

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