Thread: Determining number of times a character appears in an array

  1. #16
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Code:
    Enter sentence.
    The dog runs fast.
    Enter character to find in sentence.
    s
    Number of times s occurs: 2
    That's using the code you posted of course (only changing function parameter to char *, and putting & in the scanf).

  2. #17
    Registered User
    Join Date
    Oct 2008
    Posts
    48
    Oh i know what i did, thanks a ton. I got it to work!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. REmoving a character from a character array
    By Bladactania in forum C Programming
    Replies: 3
    Last Post: 02-11-2009, 02:59 PM
  2. Random number array
    By matt_570 in forum C++ Programming
    Replies: 12
    Last Post: 11-13-2008, 04:44 PM
  3. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 01:31 AM
  4. Merge sort please
    By vasanth in forum C Programming
    Replies: 2
    Last Post: 11-09-2003, 12:09 PM
  5. Hi, could someone help me with arrays?
    By goodn in forum C Programming
    Replies: 20
    Last Post: 10-18-2001, 09:48 AM