Thread: Counting Occurrences in an array

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    6

    Counting Occurrences in an array

    Does anyone know how to:

    if you have an array, find the occurrences of each integer in that array and put them in descending order?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Yes.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314
    Why double post the same thing?

  4. #4
    Registered User
    Join Date
    Nov 2010
    Posts
    6
    Because I am in a bit of a rush unfortunately and no one was responding to the other one. I was hoping that someone could help me with it.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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. Counting number of strings in an array
    By Hawkin in forum C Programming
    Replies: 4
    Last Post: 06-21-2010, 11:25 AM
  2. Counting occurrences of a word in a string
    By mrodgers in forum C Programming
    Replies: 3
    Last Post: 03-14-2010, 11:31 AM
  3. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  4. Class Template Trouble
    By pliang in forum C++ Programming
    Replies: 4
    Last Post: 04-21-2005, 04:15 AM
  5. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM