title: Trying to read bytes using fread but getting Segmentation Fault 11
body: <p>Im writing a string as bytes to a file and then want to read the binary code back as a string using strtol. I checked the the binary file and it contained the binary of the letter i included using xxd -b filename. However when i try to read it back and convert it to a string it gives a segmentation fault 11. Not sure what I'm doing wrong.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main() {
  
      FILE* fr = fopen("kot.bin", "wb+");
      size_t written = fwrite("n", 1, 1, fr);
      printf("written is: %zu\n", written);
      fclose(fr);
  
      FILE* fw = fopen("kot.bin", "rb");
      char * name;
      size_t red = 0;
      red = fread(name, 1, 1, fw);
      if (red==0) {
          printf("ur wrong\n");
      }
      printf("red: %zu\n", red);
      char c = (char) strtol(name, NULL, 2);
      printf("c: %c\n", c);
  
      return 0;
  }
  </code></pre>
  
  <p>I simply want to store one byte in buffer, use strtol to make it into a a character and print it.</p>