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 / abhradeep chatterjee
the above answer is correct.
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
Explain what is the benefit of using const for declaring constants?
How the c program is executed?
How many header files are in c?
What are the different types of objects used in c?
Can a file other than a .h file be included with #include?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Explain a pre-processor and its advantages.
What is function in c with example?
How can you access memory located at a certain address?
What is the difference between constant pointer and constant variable?
Explain what header files do I need in order to define the standard library functions I use?
Can the curly brackets { } be used to enclose a single line of code?
What does typeof return in c?
Why structure is used in c?