Question: using code c im getting a segmentation fault (core dumped)error, How could i fix this. This code is to determine size of files in unix

using code c im getting a segmentation fault (core dumped)error, How could i fix this.
This code is to determine size of files in unix
#include int main() { FILE *fp; long int size = 0; } fp = fopen("temp, txt","r"); fseek(fp, 0, SEEK_END); size = ftell(fp); if(size != -1) else printf("File size is: %ld bytes", size); printf("Error "); return 0;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
