DOUBT:https://ide.codingblocks.com/s/62656
Please explain the concept
Hi Tushar, a constructor is a special type of member function that initialises an object automatically when it is created. Constructor has the same name as that of the class and it does not have any return type.
Line number 17 in your code is calling the constructor at line number 10. The constructor takes an argument d and initialised node->data with d. The brackets in line number 17 mean that we’re calling a constructor. If we pass values in those brackets, they’re treated as arguments. Study more about what constructors do and how they are called.