title: Structures and fprintf()
body: <p>I was wondering if it is possible to use fprintf() with a structure, because I know you can't use a "%" for the structure.</p>
  
  <pre><code>struct blackhole_register
  {
  int userID;
  float blackhole_Mass;
  char blackhole_ID[5];
  char name_First[11];
  char name_Last[16];
  };
  int main ()
  {
  struct blackhole_register input;
  struct blackhole_register output;
  
  FILE *blackhole_file;
  
  if ((blackhole_file = fopen("Holter.txt","w")) == NULL)
  {
      printf("File location not found, the program will now end\n");
  }
  else
      printf("Schwarzschild Radius Application by Jonathan Holter\n\n");
  
      printf("\nFirst Name: ");
      fgets(input.name_First,11,stdin);
  
      printf("\nLast Name: ");
      fgets(input.name_Last,16,stdin);
  
      printf("\nUser ID: ");
      fgets(input.userID,4,stdin);
  
      printf("\nBlack Hole Name/ID: ");
      fgets(input.blackhole_ID,20,stdin);
  
      printf("\nBlack Hole Mass (Solar Masses): ");
      fgets(input.blackhole_Mass,3,stdin);
  </code></pre>
  
  <p>This is what I have so far, any help would be wonderful!!</p>