You are a member of CIA. And your duty is to decrypt encrypted data sent by the spy of Iraq. They send four strings. 2nd one is a subsequence of 1st one and 4th one is reverse subsequence of 3rd one. To decrypt the message you need to replace each subsequence position of the 4th string at 3rd string by corresponding value of 2nd string at 1st string. Take a look at the example:-
1st string:– Do is hide nor aotomata sink
2nd string: – Dish not mask
3rd string: – Mile Saw Odeaa at Nopdh Bagdad turtlik FroGay.
4th string: – Goklrutp pedl
The decrypted data is:– Mike Saw Osama at North Bagdad on this Friday.
Some times the message may be corrupted, you must check if the 2nd and 4th are subsequence or not. If not print error message or print the decrypted line.
Use string header file to do the task.