0 votes
in C Plus Plus by

What is the process to generate random numbers in C programming language?

1 Answer

0 votes
by

The command rand() is available to use for this purpose. The function returns an integer number beginning from zero(0). The following sample code demonstrates the use of rand().

Code –

<!--[if gte vml 1]> <![endif]--><!--[if !vml]-->random numbers<!--[endif]-->

Output –

<!--[if gte vml 1]> <![endif]--><!--[if !vml]-->random numbers Output<!--[endif]-->

...