subject

Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to print two random integers between (and including) 0 and 9. End with a newline. Ex: 5.
7.
Note: For this activity, using one statement may yield different output (due to the compiler calling rand() in a different order). Use two statements for this activity. Also, after calling srand() once, do not call srand() again. (Notes)
1 #include
2 #include //
3 Enables use of rand ()
4 int main(void) ( int seedval;
6.
7. scanf ("%d", &seedval);
8.
9.
10 srand(int seedval);
11 printf("%d\n", srand());
12 printf("%d\n", srand());
13
14 return e;
15 }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
You know the right answer?
Type a statement using srand() to seed random number generation using variable seedVal. Then type tw...
Questions
question
English, 02.09.2020 23:01
question
Mathematics, 02.09.2020 23:01
Questions on the website: 13722363