Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions