Linked list Doubts

The output of my code only print first element. Please tell me what is wrong in it.

  1. In print function, you don’t need to pass by referrence.
  2. In Insert at tail function, you need to attach the new node at tail’s next(i.e. tail->next=new node(data))
    Kudos… happy coding !!