I am learning c, however i understand the concept of pointers but here i am having trouble.What is mean by a pointer in the definition of a function. Here v is a local pointer defined within the function so returning it means that only the values will be copied and returned or a pointer to that block will be returned because what i also learnt that local variables have only life time until the function executes. Will someone like to explain, will be a great help.
struct verpl * nieuw (int van, int naar, int aantal, register struct verplaatsing * lijst)
{
register struct verpl * v = (struct verpl *) alloc(sizeof(struct verpl));
aNieuw++;
v->van = van;
v->naar = naar;
v->aantal = aantal;
v->volg = lijst; // plaats het element vooraan in de lijst
return (v);
}
Function call
lijst = nieuw (via, huidig->naar, huidig->aantal - 1, lijst);