Monday, December 9, 2013

Print the Elements of Singly Linked list

//print the element in the list
void single_linked_list::print_list()
{
    node* temp_node = first_node;
    while(temp_node)
    {
        printf("%d \n" , temp_node->data);
        temp_node =  temp_node->link;
    }
}




No comments: