: how to replace a word in a given file with another word ?
: that file may contain a single sentence or a passage. while replaceing the word the spaces left have to be deleted if the given word is smmaler than tha actual word in the passage and if the given word is bogger than the actual word exrta space have to be created at he actual word so that the given word may fit at hat place
:
:
: i have used files and file reading concepts and some funtions in strings
:
: can anyone send me the required solution i am very much in need of that
:
:
this is the psuedo algo:
while file1 got input
read one char from file1 to a
if a = first char of search string
read the rest bytes and compare,
if equall then print out search string
if not then print out the rest bytes previusly read
else
print a
'print' means to write to the outputfile.