how to print random number in c code example Example: random number generator c rand() % (maxlimit + 1 - minlimit) + minlimit;