fputc() Function: This function writes a character to a specified file at the current file position and then increment the file position pointer. The putc() macro acts essentially identically to fputc(), but is a macro that expands in-line. It may evaluate stream more than once, so arguments given to putc() should not be expressions with potential side effects.
The fputc() function returns an integer representing the character written. If a write error occurs the error indicator is set and fputc() returns EOF.
printf("this file does not exist\n");
printf("enter the text")