Saturday, June 29, 2013

Define a structure in C language to represent singly linked list.



struct my_node{      //structure name ‘my_node’
                   int data;    //data field
                   struct my_node *next;      //pointer to next node
                  };
typedef struct my_node SingleNode;    //defining a node of singly linked list ‘SingleNode’

No comments:

Post a Comment