Passing pointer to array to a function

This is a discussion on Passing pointer to array to a function within the C Programming forums, part of the General Programming Boards category; Hi,
I've been tearing my hair out trying to pass an array to a function using pointers. I keep reading ...

Passing pointer to array to a function

Hi,

I've been tearing my hair out trying to pass an array to a function using pointers. I keep reading things that tell me an array is a pointer to a series of addresses, and then others that tell me this isn't quite true. So I have no idea what to do.

I am a student trying to do a homework and just can't seem to figure this one out.

Your function requires a pointer, not the value located in the pointer. So, you want something like:

get_input( stu_num, pscount, gpa, stu_hours, pfinish );

When passing a pointer, not a pointer to a pointer, to a function that takes a pointer as an argument, just use the name. If you use '* name', you actually end up dereferencing the pointer which gives you the value contained in whatever the pointer points at. Example: