Code giving error

it will be reading the file , so cursor should be at end no. why it will be at the start?

after reading is completed , the cursor gets back to the same position as it was on earlier.

no overwriting is done

hello brother are u there

it isn’t overwritted , you are correct.

  1. because you haven’t taken write operation, instead you choose append. So till now you have the pointer at the last position
  2. Now you have done , seek ,so you will be at starting position and hence able to read all data.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.