0 votes
93 views
in C program by (1.7k points)
edited

How do you generate random numbers in C?

1 Answer

0 votes
by (1.7k points)
selected by
 
Best answer
Random numbers are generated in C using the rand() command. For example: anyNum = rand() will generate any integer number beginning from 0, assuming that anyNum is a variable of type integer.

Related questions

0 votes
1 answer 120 views
0 votes
1 answer 103 views
0 votes
1 answer 118 views
0 votes
1 answer 129 views
0 votes
1 answer 143 views
asked May 14, 2022 in C program by Doubtly (98.9k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

537 users

...