The code must give the output "C++Programming C". But the output i am getting is "C++Programming g". In many cases i have seen when i have forwarded the file pointer , the characters can be well read but when the pointer is brought back the desired characters cannot be read.