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
cavium networks written test pattern ..
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What are loops in c?
What is #ifdef ? What is its application?
Are pointers integers in c?
What is the use of bit field?
Why is c faster?
What is difference between main and void main?
Where we use clrscr in c?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Difference between Shallow copy and Deep copy?
What is static memory allocation? Explain
What are logical errors and how does it differ from syntax errors?
What are the advantages of the functions?
How do you define a function?