>>151
void concat(struct node *p, struct node *q)
{
if( !p || !q ) return;
while( p->next ) p = p->next;
p->next = q;
}
int length(struct node *p)
{
int ret = 1;
if( !p ) return 0;
while( p->next ) ret++;
return ret;
}

struct node が示されてないから想像で書いてみた