I\'m trying to generate random number between 0 and 40(inclusive). So the code I Implemented is this-
y=rand()%41;
However everytime I click c
As for how it works, it depends. Many implementations use a Linear Congruential Generator, with different parameters.