+1 vote
43 views

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

in Technology by (190k points)

1 Answer

0 votes

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:

#include <stdio.h>
#include <stdlib.h>
 
int main ()
<div class="line number5 index4 alt2" style="border: 0px !important; margin: 0px !important; padding: 0px 1em 0px 0em !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; righ
by (190k points)

Related questions

0 votes
1 answer 13 views
+1 vote
1 answer 15 views
0 votes
1 answer 35 views
0 votes
1 answer 32 views
+1 vote
1 answer 19 views
+1 vote
1 answer 14 views
+1 vote
1 answer 11 views
+1 vote
2 answers 32 views
0 votes
1 answer 9 views
0 votes
1 answer 6 views
+1 vote
1 answer 18 views
+1 vote
1 answer 13 views
+1 vote
1 answer 16 views
+1 vote
1 answer 28 views
+1 vote
1 answer 15 views
+1 vote
1 answer 54 views
+1 vote
1 answer 17 views
...