Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started