Write a C/C++ program which implements the following functionality1) Read two files simultaneously(we will modify this to make more generic later)
2) File A contains the list of strings and file B is regular text file
3) Read the string mystr(for eg) from File A and search for it in File B
4) Each occurrence of mystr in File B should be replaced with mystr-<suffix>
5) A new File B_Mod should get generated with all the string replaced.

try separating each word into a different char[] u can use a for loop combined with an if to check for space character (ascii 32) then it should be a piece of cake just compare and add x where they reapeat

Agreed; this is likely to be quite difficult if you try to do this character-by-character. Separate the words into strings, using arrays or vectors to store individual strings, then for each word in the input, check if it exists in the second, then display word or word-x accordingly.

By the way, when posting code PLEASE USE CODE TAGS. It's detailed in the posting guidelines. Failure to comply with this probably won't get you banned, but it'll probably get you ignored; if you can't be arsed to use simple code tags, why should we be arsed to help you?

Stop talking in txtspk please. You have a full keyboard at your disposal that does not need multiple keypresses for 1 letter, and are not limited to 160 characters. Use sentence structure as well please.

If you are already familiar with cin >> var_name; for reading from cin, you can do the same with an istream. You'll need to check your course notes for how your tutor expects you to do file handling.

u can get line by line from a file... using
getLine(<filename>,<line>)
as i suggested before afterwards u may have to check for the presence of black space to sperate into different words. then do the manipulation to output x, using comparison.