Question: C Programming Description The programming language Python has some really nice functions for dealing with files. One of them is called readlines and it reads

C Programming

C Programming Description The programming language Python has some really nice functions

Description The programming language Python has some really nice functions for dealing with files. One of them is called readlines and it reads the lines of the files into an array. For this projcet you will be implementing readlines in C. Additional Details For this assignment you will be creating a function and not an entire program The function your create should have the following signature: void read lines(FILL" fp, char lines, int* num lines) This function should read all of the lines in the file pointed to by to and . o Set each row of lines to contain one line of the file o Set num lines to be equal to the number of lines that were in the file If the file is empty lines should be set to NULL and num-lines to 0 . You should only submit read_lines.c and read lines.h o I will provide main.c and the Makefile Your code must compile using this Makefile and main.c o You cannot edit main.c While you only have to write read_lines you can write as many other functions as you want Hints Thighly recommend making more functions than just read_lines for solving this problem. . For example a function that reads a single line from the file o Examples User input has been underlined to help you differentiate what is user input and what is program output Example read lines.out Makerne read lines out: read lines.o main. gee -g -Na1l-Nerro-o read lines.out read ines.o main.o main.o: main.c read lines.h gee-g-Nall-Werzo-c-o main.o main.c read lines.o: read lines.c read linea.c gcc -g -Nallerror-c-o read lines.o read 15nes.c clean

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!