I make this program work using trial and error and from help on this site but i cant understand what is happening at each step in inserbeg(int x) and display() function.Please tell in normal english.
I am having a hard time trying to explain how this works because it is backwards.
You are putting thee next node in front of the original "start: and changing the address of "start". "start" should be the first node with an address that never changes. Each new node would then come after start so that everything is in the correct order.
The "display" function works, but since the linked list is backwards it prints correctly, but in reverse order from what you entered.
I will work on something that is more of what is generally done that I can explain to you.
what does insertbeg do:
-------------------------------
https://stackoverflow.com/questions/19194224/adding-node-to-the-front-of-a-linked-list
http://scanftree.com/Data_Structure/Insertion-in-beg
There's nothing unusual or "backwards" about this implementation (besides the unnecessary use of globals). A singly linked list that inserts at the head is absolutely common. For example, the most basic lists in functional languages such as List and Haskell behave like this.