Write a program that has an array of integers as below:
-12, 3, -12, 4, 1, 1, -12, 1, -1, 1, 2, 3, 4, 2, 3, -12
The program should counts the number of occurrences of each array element. Output a two-column list where the first column is a list of the distinct array elements and the second column is the count of the number of occurrences of each element.

Recommended Answers

Here's a reasonably well written tutorial on arrays, that should help.

Jump to Post

All 2 Replies

I really like this tutorial on arrays. It helped me alot and I think that this is one of the best c++ tutorials out there. Tutorial on arrays in c++

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.