Computers and Technology

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:50, tatumleigh04
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
image
Computers and Technology, 23.06.2019 12:00, deflox74
What does the level 1 topic in a word outline become in powerpoint? a. first-level bullet item b. slide title c. third-level bullet item d. second-level bullet item
Answers: 1
image
Computers and Technology, 25.06.2019 01:30, jamesvazquez3135
The physical parts or components of a computer system is called .
Answers: 1
image
Computers and Technology, 25.06.2019 06:50, pattydixon6
A1-megabit computer memory chip contains many 27 ff capacitors. each capacitor has a plate area of 3.09 ร— 10โˆ’11 m 2 . determine the plate separation of such a capacitor (assume an empty parallel-plate configuration). the characteristic atomic diameter is 10โˆ’10 m = 1 หša, and the permittivity of a vacuum is 8.8542 ร— 10โˆ’12 c 2 /n ยท m2 . answer in units of หša.
Answers: 3
Do you know the correct answer?
Create a C/C++ program to maintain a fixed size library of 1024 documents, whose size randomly range...

Questions in other subjects:

Konu
Physics, 22.01.2020 15:31