Question: Question: Write C/C++ code for a program that takes as command line argument a file name. Your program will make a memory map of the

Question:

Write C/C++ code for a program that takes as command line argument a file name. Your program will make a memory map of the file and replace all integers with spaces. Make two threads for this purpose. The first thread will replace integers with spaces from the first half of the map and the second thread will replace integers with spaces from the second half of the map. Assume that there are 100 bytes in the file. (Hint: Create a single map. Pass the map pointer to first thread as parameter. For the second thread, add 50 to the map pointer and pass it to the second thread as parameter, i.e., map+50.

Sample Data for File:

v1gU6OTgN7DMifG7zmQWp04ZEyGmRifq1uFsS9RzZWcCQL7jBMNKUQVEAIsKZia40M3TqJeGEMEkkSagfUc7mU3PbQ1zsiJm23Hq

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!