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
How can you find the exact size of a data type in c?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Can a pointer point to null?
Why c is called a middle level language?
What are the difference between a free-standing and a hosted environment?
Explain output of printf("Hello World"-'A'+'B'); ?
How many bytes are occupied by near, far and huge pointers (dos)?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
Explain what is the concatenation operator?
What are register variables in c?
Which is more efficient, a switch statement or an if else chain?
Is c call by value?
Tell us something about keyword 'auto'.
How can you read a directory in a C program?