I'm having a heck of a time with this problem. I want this short program to read the array of numbers, and tell me how many numbers are in the array. What I'm getting besides the memory addresses, is a list of the numbers which I don't need. Just how many numbers it counts in the array. this line: printf("%d\n", outputList[numFound]); isn't required I was just using it to test to see what I'm getting. Any ideas? thank you.
Code:#include <stdio.h> #define MAX_SIZE 100 int getinput( double outputList[]); // function prototype int main (void) { int array[] = {3,4,5,67,5,43,2,2,3,4,5,5,6,5,4,2,3,5}; getinput(array); // function call return 0; } // end main int getinput( double outputList[]) { // function definition int numFound = 0; // counter for (numFound = 0; numFound < ; numFound++) { printf("%d\n", outputList[numFound]); } return numFound; } // end function getinput



LinkBack URL
About LinkBacks


