Question: URGENT I need a C program that opens a file, goes through the file and stores each line in its own global array , for

URGENT

I need a C program that opens a file, goes through the file and stores each line in its own global array , for example

global arrays that will be already initialized : int array1[100]; int array2[100]; char array3[100];

char array4[100];

You may also initialize some other global arrays/variables if u wish

example file:

start: starting

andy was here: 13424T35435

bye bye: location

goodbye: hello

End: ending

THE FILE WOULD NOT HAVE BLANK LINES IN BETWEEN THE LINES.

after parsing and execution, the output of the arrays should be the following array1 = 13424, array2 = 35435 , array3 = location, array4 = hello

you can use strtok and sscanf to parse. THANK YOU THIS IS URGENT

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!