0
How to get random element from a list in c code?
I have never come across any way of getting a random integer or a random item from a list... I wanted to know if there is a way to get a random item from a list or a random integer from a given range...
1 Réponse
+ 3
Atiksh Genius ,
Read this article
https://www.geeksforgeeks.org/rand-and-srand-in-ccpp/amp/
Generate a random number and use it as index to access element from array.