Sed: replace content from file with the content from file

Hi,

I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!

Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file C: c.txt)

a.txt
Hello World
Hello ABC

Hello
Hello

b.txt
Hello ABC

Hello

c.txt
Hi XYZ

XYZ

Test

Here is the expected output:
a.txt
Hello World
Hi XYZ

XYZ

Test
Hello

Replace it with content in file C on the basis of what?

sed. Actually I am writing a shell script to modify some existing shell script. But I am not able to use sed directly as the string I wanted to replace is too long. So, I want to use two files to be the configuration file.

This is not clear. Also use code tags.
Post your full files, and not just test files.

If I just read this: copy file C to file A and file B

cp c.txt a.txt
cp c.txt n.txt

Here Ihave replaced content of file a.txt and b.txt with c.txt