puoi usare una cosa del genere
codice:
void aggiungicoda(int m,struct nodo *p){
if(p==NULL){
            printf("\nDevi prima creare una lista.\n");
     }else{
        struct nodo *c;
        struct nodo *f=p;
        struct nodo *b=p;
        c=(struct nodo*)malloc(sizeof(struct nodo));
        c->x=m;
        while(f->next != NULL){
        	f=f->next;
        	}
        f->next=c;
        c->next=NULL;
        }
return;
}
studia questa se vuoi