My malloc is allocating consecutive addresses. I want my linked list next address to be a random address instead of consecutive addresses. I know malloc is hard to control; so i wanted to know how to randomize the pointers in the linkedlist? For exxample ; if link1->next = 0xf8 ; link2->next = oxf9; link3->next = 0xf9; I want to make link1->next = 0xf8 ; link2->next = oxfa ; link3->next = 0xf9
Methods to generate random numbers is one thing but what is the purpose of randomizing the links in a linked list? Surely, the whole point of a linked list is that each entry points the the next in sequence anyway, no matter what address the link actually points to.