Hi guys.


This Is really stupid but I am trying to read and write from files.


So I want for example write to a file test.test  a character “H”


And then read that file and save the character in a variable.


So I got this far :


      FILE *fp;

      char textdat;


      /* Write “GO” to a file */

      fp = fopen("test.test", "w");


      fprintf(fp, "Go");




      /* Read character from file */


      fp = fopen("test.test", "r");


What next ?