Thread: Counting numbers of upper and lower case letters in C programming?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    Keep a counter of upper and lower case letters...
    Code:
    int cnt_upper = 0, cnt_lower = 0;
    Then inside the if block where you determined whether something is upper / lower, just add 1 to the counter.

  2. #2
    Banned
    Join Date
    Apr 2011
    Posts
    56
    I tried that and when you run the program it start a endless loop. Can you explain lil more clearly?
    Also, just to make sure that I am writing this program in C language.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 03-07-2011, 02:15 PM
  2. Simple program problem from upper to lower case
    By steals10304 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2009, 02:31 AM
  3. help...Lower and Upper case problem only
    By j4k50n in forum C Programming
    Replies: 9
    Last Post: 04-19-2007, 12:39 AM
  4. Remove upper case letters from a char string
    By lavinpj1 in forum C Programming
    Replies: 8
    Last Post: 05-01-2006, 12:09 PM
  5. upper case to lower case problem
    By Jasonymk in forum C++ Programming
    Replies: 3
    Last Post: 04-27-2003, 05:35 AM