I need to open a file to read the contents and display its contents on the screen. This should be done using GIO file handling. I am going through the tutorial but as a practice, I need the code using GIO for the following c code. In c the program could be:
#include<stdio.h> #include<string.h> int main() { FILE *fp; char temp[1000]; if(fp=fopen("locations.txt", "r") != NULL) { fgets(temp, 1000, fp); printf("%s", temp[1000]); } fclose(fp); return 0; } thanks in advance.