1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

link list

Discussion in 'C' started by answerme, Mar 31, 2008.

  1. answerme

    answerme New Member

    Below code is for inserting data to the front of the node ,just wanted to know we have reassigned start = tmp ,i.e. start will point to the inserted node which is now new first node but how

    int add_begin(int data)
    			struct node *tmp;
    			tmp=malloc(sizeof(struct node));
    			tmp->info=data;// put data
    			tmp->link=start;// point to nxt node 
    		[B]	start=tmp; // start will point to inserted node [/B]		

Share This Page