Richard Heathfield said:
lovecreatesbeauty said:
Parameters are *not* used to pass arguments.
Arguments are what you provide to the function call mechanism, which
evaluates them and passes them to the function, which receives them as
parameters.
Pointers are used in C to emulate the pass-by-reference facility that
some other languages provide.
C doesn't really have pass-by-reference, but you can emulate it using
pointers (which are, of course, passed by value). The question of
whether this is really pass-by-reference is more about the meaning of
the word "really" than about the C language.
C doesn't really have linked lists, but you can build linked lists
using structures and pointers. If I write code in C that implements a
linked list, is it not really a linked list because the language
doesn't support it directly?
Everything that isn't hardware (and a great deal that is) is
emulation.
It's vital to understand that C function arguments are always passed
by value, and that pointers are the way to emulate pass-by-reference.