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


Please Help Members By Posting Answers For Below Questions

What is structure padding and packing in c?

614


What is restrict keyword in c?

638


Why doesnt that code work?

597


What are the usage of pointer in c?

701


What is the use of putchar function?

646






What is a node in c?

543


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.

1589


What is storage class?

654


In C language what is a 'dangling pointer'?

632


How do I read the arrow keys? What about function keys?

610


What is putchar() function?

633


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

713


Explain what are reserved words?

630


What 'lex' does?

712


What does it mean when the linker says that _end is undefined?

625