title: Implicit declaration of 'gets'
body: <p>I understand that an 'implicit declaration' usually means that the function must be placed at the top of the program before calling it or that I need to declare the prototype.<br>
  However, <code>gets</code> should be in the <code>stdio.h</code> files (which I have included).<br>
  Is there any way to fix this?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(void)
  {
     char ch, file_name[25];
     FILE *fp;
  
     printf("Enter the name of file you wish to see\n");
     gets(file_name);
     fp = fopen(file_name,"r"); // read mode
     if( fp == NULL )
     {
        perror("Error while opening the file.\n");
        exit(EXIT_FAILURE);
     }
  }
  </code></pre>