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 / kap
it is not the correct answer because the range they asked 0-
1000 so need to to %1000. :-)
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the sizeof () operator?
Explain the use of 'auto' keyword in c programming?
What is the use of sizeof () in c?
differentiate built-in functions and user – defined functions.
What does *p++ do?
Explain about C function prototype?
When should volatile modifier be used?
Are enumerations really portable?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What is the difference between a function and a method in c?
What is the purpose of main( ) in c language?
What is actual argument?
Explain how can I right-justify a string?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What is C language ?