Okay, I am working on a homework assignment for my class in which we are supposed to use pointers for all of the arrays in the functions. Here is what I have so far for the printArray function, which is supposed to print the members of the array horizontally. It is printing out nonsense right now: HPX'HPX'HPX. And then the program is having an error and terminating. What am I doing wrong? Also, how do I use pointers to do this, because right now I'm not using them?
void printArray(double * array, int what)
{
int i;
for (i=0; i < sizeof(array); i++)
{
printf("%c",& array[i]);
}
}