C help

So I was given an assignment in class and my teacher really doesn't explain anything very well. He just reads a powerpoint slide and expects you to understand between the ums and uhhhhs what he's talking about. What I'm asking is if someone could simplify what is being asked here.

Do not use global variables. Pass your arguments by value and by reference (address). Using arrays and modular programming techniques, write a C program that will allow a user to populate an array with integers, and then sort and compute and print out the number of adjacent triplets in the array (i.e. the number of occurrences where an array element is the same as its neighbour and its neighbour’s neighbour). For example, if the array contained [2,3,3,3,4,4,52,52,52,4,4,4,4,7,7,1,3], the number of adjacent triplets is 7. The program should give the user the option of examining more than one array (i.e. loop). Assume the array has a max. of 30 elements. Note: as explained in class, the main() function should primarily be responsible to direct the flow of logic. That is: use one function to obtain input (pass by reference), another function to do processing (pass by value), and perhaps a third function to do output (pass by value). The main() function should call the input function and the processing function. You can choose to call the output function either from main() or from the processing function
What have you written so far?
Topic archived. No new replies allowed.