subject

Create a C/C++ program to maintain a fixed size library of 1024 documents, whose size randomly ranges between 2MB to 3MB. This library is managed in a FIFO fashion. The program also maintains a separate, fixed size C-style struct (named recent_list) containing 128 pointers that points to a different set of individually initialized documents, whose size randomly ranges between 2MB to 3MB. At start up, every document is individually initialized with random upper case letters: A to Z. Duplicate documents are permitted.

Separately, the program maintains a dictionary of words: FIRST, CPP, REVIEW, PROGRAM, ASSIGNMENT, CECS, BEACH, ECS, FALL, SPRING, OS, MAC, LINUX, WINDOWS, LAB. A randomly chosen word from the dictionary is searched (FIFO, i. e. pointer 0 to pointer 127) in every document of the recent_list struct. A document in the recent_list struct whose substring(s) does not match the searched word is ejected/moved to the end of the library & reinitialized (same length), and the first document from the library is copied to the end of the recent_list. Therefore, the documents in each list would be constantly shifting relatively. For example, the documents copied from the library to the recent_list are inserted in the same order that they were copied.

Sample output:
CPP: 0 document ejected ASSIGNMENT: 3 documents ejected & reinitialized

Resulting list & library:
Compact the remaining 125 documents of the recent_list (i. e. move documents up to fill any gap), and the first 3 documents of the library are moved to the end of the recent_list sequentially. The remaining 1021 documents in the library are also moved up, and the 3 ejected documents from the recently_list are now at the end of the library, whose contents are reinitialized.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Setting up a home network using wireless connections is creating a a. vpn b. lan c. wan d. mini-internet
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
Answer these and get 40 points and brainliest
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
The idea that, for each pair of devices v and w, there’s a strict dichotomy between being “in range” or “out of range” is a simplified abstraction. more accurately, there’s a power decay function f (·) that specifies, for a pair of devices at distance δ, the signal strength f(δ) that they’ll be able to achieve on their wireless connection. (we’ll assume that f (δ) decreases with increasing δ.) we might want to build this into our notion of back-up sets as follows: among the k devices in the back-up set of v, there should be at least one that can be reached with very high signal strength, at least one other that can be reached with moderately high signal strength, and so forth. more concretely, we have values p1 ≥ p2 ≥ . . ≥ pk, so that if the back-up set for v consists of devices at distances d1≤d2≤≤dk,thenweshouldhavef(dj)≥pj foreachj. give an algorithm that determines whether it is possible to choose a back-up set for each device subject to this more detailed condition, still requiring that no device should appear in the back-up set of more than b other devices. again, the algorithm should output the back-up sets themselves, provided they can be found.\
Answers: 2
You know the right answer?
Create a C/C++ program to maintain a fixed size library of 1024 documents, whose size randomly range...
Questions
question
Mathematics, 29.01.2020 17:49
question
Mathematics, 29.01.2020 17:49
Questions on the website: 13722360