Question: I need help to code the function of the program with C language. This prog should able to run under the GCC command. Plz help

I need help to code the function of the program with C language.

This prog should able to run under the GCC command.

I need help to code the function of the program with C

Plz help me to make this read_lines.c and read_lines.h

This function should be able to open a txt file and read the information inside (reads the lines of the files into an array), and save them into lines[i] line by line,

for example, for the file "Hello world Say hi Hi ",it should record lines[0] Hello world, lines[1]Say hi, lines[2]Hi, lines[3] .

It should have an int value called ReadNum to record the total number of lines in the file

Those value should return to main.c

Qint main(int argc, char* argv[]) { char** lines = NULL; int num_lines = 0; FILE* fp = validate_input(args, argv); read_lines (fp, &lines, &num_lines); print_lines(lines, num_lines); free_lines(lines, num_lines); fclose(fp); return

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!