i am trying to copy data from one file to another using fread & fwrite.the problem is the number of bytes to be read in the argument of fread & fwrite, which is the 2nd one.
fread (*buffer,number of bytes,numbers of objects,FILE *fp);
this is my code-
if (feof (fp)) break;
fclose (fp); fclose (fp1);
the problem is with fread. if i specify 1/2 bytes, the output is exactly the same. if i use 4 bytes, which is the size of *p,according to my compiler, the sample output is-
input: christiano ronaldo
output: chri stia no r onal
it writes 4 characters, then some spaces are written. why’s that?