C Program to Generate Random Number

| Last Updated: | In: C Programming Tutorial


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

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


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:

Tags: , , , , , ,