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 / nischal e rao
The best way to solve this problem would be to create a hash
function and apply the current time to as the argument to
the hash function. the hash function should be designed to
return a number between 1 to 1000.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
How to write a multi-statement macro?
What is meant by inheritance?
What math functions are available for integers? For floating point?
What is the use of extern in c?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
State the difference between realloc and free.
is it possible to create your own header files?
Why do we use & in c?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Simplify the program segment if X = B then C ← true else C ← false
What is the code for 3 questions and answer check in VisualBasic.Net?
What is c preprocessor mean?
What are multibyte characters?
How to get string length of given string in c?