Use fgets to read text from the given file

https:/‮www/‬.lautturi.com
Use fgets to read text from the given file
#include<stdio.h>
int main()
{
  char string[20];
  FILE *fp;
  fp=fopen("file.txt","r");
  fgets(string,20,fp);
  printf("The string is: %s",string);
  fclose(fp);
  return 0;
}
Created Time:2017-08-28 16:10:46  Author:lautturi