Write a code to generate random numbers in C Language.
Ans: Random numbers in C Language can be generated as follows:

#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,b;
for(a=1;a<=10;a++)
{
b=rand();
printf("%dn",b);
}
return 0;
}
//Output
1987384758
2057844389
3475398489

Posted on by