I am trying to find a data from my linked list, in which I scroll it until it is null and say if that number to look for or not in the list
Code:
aux=primero;
while(aux != NULL && aux->dato != 50)
{
aux=aux->siguiente;
}
if(aux->dato==50)
{
printf("\n\n Numero %d esta en la lista",aux->dato);
}
else
{
printf("\n\n El numero %d no esta en la lista",aux->dato);
}
I miss an error saying that the program stopped working.