>temp1=temp;
>temp1->next=start2;
You say start2 is a null pointer, right? Well when you assign temp to temp1, you're aliasing temp, not copying the data at that address. So when you set temp1->next to null, temp->next is also set to null implicitly.
You probably want something more like this:
temp1->data=temp->data;
temp1->next=start2;
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401