How to write a code for random pick from 1-1000 numbers?
The output should contain the 10 numbers from the range
1-1000 which should pick randomly, ie ,for each time we run
the code we should get different outputs.

Answer Posted / sharan

if the randomize(); doesn't work
replace it with srand ((unsigned) time (NULL));

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program in c to replace any vowel in a string with z?

684


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

617


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

775


List out few of the applications that make use of Multilinked Structures?

1287


Are c and c++ the same?

623






What is #line?

607


What is void c?

560


how to find anagram without using string functions using only loops in c programming

2712


What is the use of function in c?

707


What are pointers?

627


write a program to generate address labels using structures?

4005


Is r written in c?

722


What is the c value paradox and how is it explained?

570


How to create struct variables?

588


What are void pointers in c?

574