Actually there was a problem in program.
In src sub-folder, .cpp files and txt files for header and footer was there .
But in .cpp file, the code for reading the the header file and write to output file is not working.
Then after debugging i got error is that the file in which we have to write was open but from where to read that is header file was not opening for reading.
I was executing the program from testing folder through makefile.
I thought that these .cpp files and .txt files are in same folder so there is no need to mention the path.
But i was wrong. When i specify the path, code is working.
It is opening the files for reading.
Also learn about various flags for opening a file.