Question: read input file from beginning to end, character by character maximum with character array size of 32 and also read file from reverse character by

read input file from beginning to end, character by character maximum with character array size of 32 and also read file from reverse character by character again with maximum array size of 32? Also compare the the character from beginning and character from reverse and print zero if same character and if not print 1. Only after you will print a newline character to the screen. Then print the position and actual character that differ as shown in example below and the total number of characters that differ as in example below.
Just use POSIX system I/O calls i.e. use only open(), close(), read(), write(), lseek(). you cannot use c or c++ I/O library function or cin and cout. Also give comments to all the codes.
Example:
Input file: abcdefdcbx
Print on screen:
10001100011
1 a x
5 e f
6 f e
10 x a
Total: 4 character positions differ.

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!