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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.