> May I know the why I cannot read immediately after writing?
Because that's what it says in the standard and the manual pages.
Type: Posts; User: Salem
> May I know the why I cannot read immediately after writing?
Because that's what it says in the standard and the manual pages.
Between writing and reading, you need to use
fflush(fr);
> printf("\nThe text now is %s", s);
What do you expect to see?
If the original file was "Hello", then you could be looking at...