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
main() { printf("hello"); fork(); }
How can I manipulate strings of multibyte characters?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Difference between exit() and _exit() function?
How do you view the path?
What does the file stdio.h contain?
What is void c?
Tell me what is the purpose of 'register' keyword in c language?
What is sizeof c?
What is pass by reference in c?
Explain what is the stack?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Differentiate between ordinary variable and pointer in c.
Are comments included during the compilation stage and placed in the EXE file as well?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor