Question: write a C + + program. You are given an encoded file with characters, tabs and line returns. You do not know the file length.

write a C++program. You are given an encoded file with characters, tabs and line returns. You do not know the file length. The encoding works by exchanging every:
a. one (1) for the character '#'
b. zero (0) for the character ''
c. two (2) for the character '*'
d. three (3) for the character '@'
e. do not display tabs, so you must check if the character to be read is a tab
f. respect line returns. Line returns are not encoded, and they must be displayed in the same place and unchanged in the unencoded file.
Read the file and display the unencoded file on screen. Only one (1) output. Use functions as needed. No need to create the unencoded file.
What does the output look like?
this is the file:
111111111111111111111111111111111111111
1000000000000000000000000000000000011111
101111111111111111111111111111111011111
101320000000000000000000000000001011111
101111111111111111111111111111101011111
100000000000000000000000000000001011111
11111111111111111111111111111101011111
100000000000000000001000000000101011111
101111111100000000010000000000101011111
10111111110000000001000000000101011111
101111111100000000010000000000101011111
10111111110000000001000000000101011111
101111111100000000010000000000101011111
101000000000000000000000000000101011111
101011111010000000001000000000101011111
101011111010000000001000000000101011111
101011111011111110111011111111101011111
101011111010000000000000000000101011111
101011111010000000001000000000101011111
101011111010000000001000000000001011111
101011111010000000001000000000111011111
101011111010000000001000000000100000001
101011111010000000001000000000100000001
10101111000000000001000000000100000001
101011111110000000001000000000100000001
101000001000000000001000000000100000001
101011101011111111111010111111100000001
101023101011111111111010000000100000001
101111101011111111111011111010100000001
100000001011111111111000000010100000001
111111111011111111111000000010111111101
100000000011111111111000000010000000001
1011111111111111111000000011111111101
10111111111111111111000000011111111101
10111111111111111111000000011111111101
1011111111111111111000000000000000001
10111111111111111111111111111111111101
101111111111111111111111111111111111101
101111111111111111111111111111111111101
101111111111111111111111111111111111101
1011111111111111111111111111111111101
101111111111111111111111111111111111

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 Programming Questions!