Question: Use C language. Please include comments. Thanks. Problem Specification You are asked to write one C program. The program will encode a file containing a

Use C language. Please include comments. Thanks.
Problem Specification You are asked to write one C program. The program will encode a file containing a text (in ASCII) into Base64 using a given index table. PROGRAM: Your program uses two files as the input. A file Key.dat" contains the index table, i.e., a sequence of characters where the first character represents 0, the second character represents 1, and so on, the last character represents 63. Your program should use this table to encode a text given in the other file named "Raw.dat" into Base64 format. Your program creates an output file "Encoded.dat" that should be formatted as shown in the example below, it means characters are separated into groups of 8 with a space between them; each line should contain 6 groups. INPUT FILES: Key.dat ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456 789+/ Raw.dat Reserve your right to think, for even to think wrongly is better than not to think at all. --Hypatia OUTPUT FILE: Encoded.dat UmVzZXJ2 ZSB5b3Vy IHJpZ2h0 IHRVIHRO aW5r LCBm b3Ig2xzi biBbyBO aGluayB3 cm9uZ2x5 IGIZIGJl dHRlciBO aGFuIG5v dCB0byB aGluayBh dCBhbGwu ICOESHlw YXRpYQ== Problem Specification You are asked to write one C program. The program will encode a file containing a text (in ASCII) into Base64 using a given index table. PROGRAM: Your program uses two files as the input. A file Key.dat" contains the index table, i.e., a sequence of characters where the first character represents 0, the second character represents 1, and so on, the last character represents 63. Your program should use this table to encode a text given in the other file named "Raw.dat" into Base64 format. Your program creates an output file "Encoded.dat" that should be formatted as shown in the example below, it means characters are separated into groups of 8 with a space between them; each line should contain 6 groups. INPUT FILES: Key.dat ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456 789+/ Raw.dat Reserve your right to think, for even to think wrongly is better than not to think at all. --Hypatia OUTPUT FILE: Encoded.dat UmVzZXJ2 ZSB5b3Vy IHJpZ2h0 IHRVIHRO aW5r LCBm b3Ig2xzi biBbyBO aGluayB3 cm9uZ2x5 IGIZIGJl dHRlciBO aGFuIG5v dCB0byB aGluayBh dCBhbGwu ICOESHlw YXRpYQ==
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
