Remember that fscanf needs an address, so if the variable is not already a pointer (like str)
then you need to put an ampersand in front of it (like &i).
Also remember that printf does NOT need the ampersand.
#include <stdio.h>

int main () {
  int i;
  char str [80];
  FILE * pFile;

  // Writing to file
  pFile = fopen ("aplus.txt", "w+");
  fprintf (pFile, "%s %d", "Y =", 30);
  fclose (pFile);

  // Getting from file
  pFile = fopen ("aplus.txt", "r");
  fscanf (pFile, "%s = %d", str, &i);
  fclose (pFile);

  printf ("Str: %s  Number: %d\n", str, i);

  return 0;