0 votes
106 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 135 views
0 votes
1 answer 100 views
0 votes
1 answer 121 views
0 votes
1 answer 130 views
0 votes
1 answer 143 views
0 votes
1 answer 160 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

557 users

...