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 / 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


Please Help Members By Posting Answers For Below Questions

Explain indirection?

1184


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.

2129


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

1153


What are the uses of null pointers?

1200


What are the different types of control structures?

1088


What is the use of sizeof () in c?

1103


When is a “switch” statement preferable over an “if” statement?

1215


Is it possible to pass an entire structure to functions?

1054


Why c is procedure oriented?

1126


What are loops in c?

1070


What is the difference between Printf(..) and sprint(...) ?

1641


Do array subscripts always start with zero?

1370


What is scanf () in c?

1177


How reliable are floating-point comparisons?

1156


please give me some tips for the placement in the TCS.

2163