C Program to Generate Random Number

Prem Tiwari - - 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

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

About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also 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.

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.