Working on another assignment and I am confused. I am sure my problem is transferring the array from main to the display function, but can't seem to make it work right for me. I have been working on this for several hours and know that if I continue I may end up with a broken computer. Can someone point out my mistake (which I am sure is obvious but I am not seeing it). Thank you for the help in learning how to program correctly.
And there is the problem of mineCode:#include <stdio.h> int *cptr, i; int channel[7]; int display (*int); int main() { *cptr = &channel[0] channel[7]= {2,4,5,7,9,11,13}; display (*cptr); return 0; } int display (int *cptr) { int *cptr, i; for (i=0; i<=6; ++i) printf ("\nElement %d is %d", i, *(cptr + i)); system ("Pause"); return 0; }