-1
I’m having trouble understanding this struct pointer concept within the struct, how does it work? how endlessly stores the next element’s address?
typedef struct elemento Elemento;
struct elemento
{
int info;
Elemento* prox;
};
Elemento* lst_cria (void)
{
return NULL;
}
Elemento* lst_insere (Elemento* lst, int val)
{
Elemento* novo = (Elemento*) malloc(sizeof(Elemento));
novo->info = val;
novo->prox = lst;
return novo;
}