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
Explain indirection?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
What are the uses of null pointers?
What are the different types of control structures?
What is the use of sizeof () in c?
When is a “switch” statement preferable over an “if” statement?
Is it possible to pass an entire structure to functions?
Why c is procedure oriented?
What are loops in c?
What is the difference between Printf(..) and sprint(...) ?
Do array subscripts always start with zero?
What is scanf () in c?
How reliable are floating-point comparisons?
please give me some tips for the placement in the TCS.