Other contributors have said "Examples of program in c plus plus that have void and rand function?" is the same question as "What is rand function in c plus plus?" If you believe that these are not asking the same thing and should be answered differently, click here

What is rand function in c plus plus?

Answer:

The rand() function returns an integer (int) value that represents a pseudo-random number between 0 and RAND_MAX, RAND_MAX being a constant declared in the run-time library. Each time rand() is invoked, a different value is returned.

First answer by Alex146. Last edit by Alex146. Contributor trust: 419 [recommend contributor recommended]. Question popularity: 1 [recommend question].