I use malloc in a while loop to create a linked list and it allocates the same space in each iteration. What is wrong? Doesn't malloc allocate the space in the heap? Why it allocates the same space each time? How can I solve this problem?
Thanks in advance.