It shouldn't be a surprise since you changed the file format after I posted my reply. You initially said File2.txt looked like
12345
ABCDEFANABCDEFGHIJKLMNOPQRSTVVWXWZ
67890
ABACFHAYJAYAFANJAKALAHUSSGSJISUSSKSOWUWSLSS
| [reply] [d/l] |
Dear Monk one more problem is coming... The program is printing the 3 word size only just after the FAN word not talking care of the position in the File 1. Example in the second case 67890 the position is 21 but the output is printing JAK instead of ALA. That means its printing position just next to FAN always instead of the original position
| [reply] |
I think the program is doing what you described, but I did find your description a bit difficult to understand. It might help to clarify your requirements if you answered the following questions.
Do you want the text at the position indicated in file1 or do you want the text after the string "FAN"?
If you want the text at the position indicated in file1 rather than the text after the string "FAN", why do you want to search for the string "FAN"?
| [reply] |