Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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

1185


How to write a multi-statement macro?

999


What is meant by inheritance?

1058


What math functions are available for integers? For floating point?

1092


What is the use of extern in c?

1064


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

1971


State the difference between realloc and free.

1043


is it possible to create your own header files?

1060


Why do we use & in c?

958


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1142


Simplify the program segment if X = B then C ← true else C ← false

2971


What is the code for 3 questions and answer check in VisualBasic.Net?

2122


What is c preprocessor mean?

1260


What are multibyte characters?

1067


How to get string length of given string in c?

1024