Write a code that writes and reads a binary file in parallel according to the following steps:
I) First process writes integers 0-9 from the beginning of the file, the second process writes integer 10-19 from the position 10 in the file and so on. Use the individual file pointers.
II) Re-open the file. Each process reads the data just written by using an explicit offset. Check that the reading has been performed correctly.
III) Each process writes the data just read in the following way (supponing that there are 4 processors) :
Data per processor:
File layout:
NOTE: to see the binary file in ASCII use the command
od -i <binary_file>