The a+ mode opens the file for both reading and appending.
The file pointer in this mode is placed at the end of the file if it already exists in the system.
The file opens in the append mode. If the file does not exist, then it is created for writing.