C Program to Generate Random Number

This c program will generate the random numbers using rand() function. This is a very simple program. In this program, we have used for loop to generate multiple random numbers.

As an example we print only the 10 numbers, you can generate as much you can by changing the number from 10 to as you want in for loop.

c program to generate random numbers

C program to generate random numbers

The output of below program will be different every time when you execute this program, because of we have used the rand() function.

Ten random numbers between 1 and 1000
384
887
778
916
794
336
387
493
650
422

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.


Article Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.