Question: PLEASE HELP ASAP In c write the following function int line_length (char *filename, int n); the function should return the number of characters of line

PLEASE HELP ASAP In c write the following function int line_length (char *filename, int n);

the function should return the number of characters of line #n in the text file who's name is filename. same the max number of characters is 1000. if for doesn't exist return 0. you might bad the file reading function fgets.

int line_length (char *filename, int n) { char str [1001]; file* pfile; int count=0; if (pfile== NULL) {print("error"); return 0;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!