Algorithm
Algorithm
dat","r"); fp2=fopen("out2.dat","w"); 4. Read the content. Using while loop perform the loop until character is not equal to E. 5. Then compare whether the character is equal to H 6. If H then get the starting address, length and input 7. Else if the character is T then store the string as the three address in the output file with input[0],inuput[1] for address input[2],inuput[3] for address+1 input[4],inuput[5] for address+2 8. Else if it is not H or T then perform the following fprintf in fp2 for output file for , input[0],inuput[1] for address input[2],inuput[3] for address+1 input[4],inuput[5] for address+2 9. Increment the address value by 3. 10. Read the next input string and repeat from step 4. 11. Finally terminate the program