Question

How to read a text file in "2DARRAY" in C Language fast please help Text file...

How to read a text file in "2DARRAY" in C Language fast please help

Text file looks like this

10000
Registered 31279 31600 20756 656098 17 59 
Registered 31107 31101 22626 353159 17 58
Casual 31200 31212 980 219234 17 58
Registered 31281 31280 21338 213473 17 56
Registered 31624 31241 21422 637695 17 56
Casual 31034 31023 748 356455 17 54
Registered 31124 31267 21480 924793 17 53
Registered 31242 31285 20113 309433 17 53
Registered 31007 31011 943 447572 17 52
Registered 31122 31214 833 438823 17 52
Registered 31264 31244 20404 350341 17 51
Registered 31238 31201 22750 568722 17 51
Registered 31304 31226 21185 229685 17 50
Registered 31212 31114 22401 405098 17 50
Registered 31067 31260 21736 2592652 17 47 
Registered 31111 31122 21005 570531 17 46
Registered 31235 31258 22953 981529 17 46
Casual 31000 31000 21251 1138485 17 59
Registered 31400 31245 21287 717971 18 59
Registered 31506 31639 20668 805857 19 59
Registered 31201 31604 20891 869229 20 59
Casual 31239 31245 116 661094 21 59
Registered 31401 31400 1422 345618 22 59
Registered 31247 31604 22510 536659 23 59
Registered 31401 31400 20027 319086 17 42 
Registered 31124 31402 21436 588125 17 41 
Registered 32000 32028 20299 115008 23 40
Registered 31223 31251 1258 301690 23 40
Registered 31264 31108 225 419708 23 39
Registered 31101 31114 21158 227107 23 37
Registered 31123 31101 21950 146185 23 37
Registered 31603 31517 22578 331902 23 36
Registered 31114 31200 22522 388371 23 36
Registered 31602 31406 22801 372036 23 36
Casual 31101 31114 1408 255988 23 36
Registered 31202 31226 20728 1008645 23 35
Registered 31222 31235 22953 714534 23 34
Registered 31275 31244 21558 889411 23 34
Registered 31611 31229 21159 1246675 23 34
Registered 31265 31623 20836 576565 23 32
Registered 31232 31228 785 887636 23 32
Registered 31517 31611 1189 338130 23 33
Registered 31111 31401 21682 686485 23 31
Registered 31228 31632 21963 1631092 23 31
0 0
Add a comment Improve this question Transcribed image text
Answer #1
sim i as Integer
sim strText as String
sim 2dArray() as String

Open "TextFile.txt" For Input As #1
' Traverse the file, handling one line at a time
Do While Not EOF(1)

    Input #1, strText
    Resim Preserve 2dArray(1 To 2, i)
    2dArray(1, i) = Split(strText, ";")(0)
    2dArray(2, i) = Split(strText, ";")(1)
     .....................
    i = i + 1

Loop
Close #1

This way you can do it. I hope it helps

Add a comment
Know the answer?
Add Answer to:
How to read a text file in "2DARRAY" in C Language fast please help Text file...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (a). Construct a frequency distribution with the suitable class interval size of marks obtained by 50...

    (a). Construct a frequency distribution with the suitable class interval size of marks obtained by 50 students of a class, which are given below: 23, 50, 38, 42, 63, 75, 12, 33, 26, 39, 35, 47, 43, 52, 56, 59, 64, 77, 15, 21, 51, 54, 72, 68, 36, 65, 52, 60, 27, 34, 47, 48, 55, 58, 59, 62, 51, 48, 50, 41, 57, 65, 54, 43, 56, 44, 30, 46, 67, 53 (b). Find the Minimum Value (c)....

  • Calculate the range, mean, mode, median, Standard deviation Calculate the skewness and kurtosis for the above...

    Calculate the range, mean, mode, median, Standard deviation Calculate the skewness and kurtosis for the above data and interpret the data. The following is data collected from the daily salary employees of ZZ COMPANY.. 68 19 43 11 37 30 19 67 65 34 96 23 93 73 46 39 21 12 89 52 33 21 18 57 80 56 91 62 56 48 84 23 78 96 49 36 90 42 65 15 43 36 65 59 34 71...

  • Consider the following Price Rating Price Rating Price Rating PriceRating 58 13 14 12 19 15...

    Consider the following Price Rating Price Rating Price Rating PriceRating 58 13 14 12 19 15 58 56 59 67 14 17 41 10 54 14 21 62 14 72 12 26 20 26 48 41 17 13 30 24 13 53 51 12 21 19 69 50 78 58 21 50 83 71 25 53 47 63 81 46 12 25 49 38 24 41 19 70 31 23 26 29 79 37 36 49 58 31 25 71...

  • Please show how you did this in excel. :13-19 Every home football game for the past...

    Please show how you did this in excel. :13-19 Every home football game for the past eight years at Eastern State University has been sold out. The revenues from ticket sales are significant, but the sale of food, beverages, and souvenirs has contrib- uted greatly to the overall profitability of the football program. One particular souvenir is the football pro- gram for each game. The number of programs sold at each game is described by the following probabil- ity distribution:...

  • Search Google or type a URL tfab * My Cart - Sammydr... Spa Castle New York...

    Search Google or type a URL tfab * My Cart - Sammydr... Spa Castle New York The Community Coll Towson University Kaiser Permaner For the data set 1 2 2 6 7 8 9 10 11 12 14 14 15 15 16 17 18 19 20 20 22 23 25 25 25 25 26 26 26 28 30 31 34 34 34 35 36 39 41 43 45 46 47 48 48 51 51 52 53 54 55 56 56...

  • The accompanying computer excel output (please see attachment on Blackboard) provides details of data and analysis...

    The accompanying computer excel output (please see attachment on Blackboard) provides details of data and analysis on the topic of “patient satisfaction”. A hospital administrator wished to study the relation between patient satisfaction (Y) and patients’ age (X1, in years) , severity of illness (X2), and anxiety level (X3). The output includes a listing of all 46 observations; descriptive statistics for each variable; and, the results of a regression analysis that uses patient satisfaction as the dependent variable, and patient’s...

  • Suppose a binary tree data (in tiny written size) is stored in an array (A) as...

    Suppose a binary tree data (in tiny written size) is stored in an array (A) as given below and root is placed at “0”index. Note the array indices are in larger written size (0 to 74). Show the traversal data of the given tree for a)      In-Order Traversal b)     Post Order Traversal A 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 28 13 36 15 9 22 44 7 10 75 33 19 15...

  • 48 57 Amy Bakery has four shops in different area in a city. Monthly sales (in...

    48 57 Amy Bakery has four shops in different area in a city. Monthly sales (in thousands of dollars) from a random of 24 months from each of the 4 shops given in Table 1. Table 1: Monthly sales (in thousands of dollars) North East South West 77 75 97 60 45 42 60 54 56 49 68 47 44 39 58 57 63 61 69 51 75 63 79 50 90 81 99 73 32 47 46 41 41...

  • West Battery Corp. has recently been receiving complaints from retailers that its​ 9-volt batteries are not...

    West Battery Corp. has recently been receiving complaints from retailers that its​ 9-volt batteries are not lasting as long as other name brands. James​ West, head of the TQM program at​ West's Austin​ plant, believes there is no problem because his batteries have had an average life of 5050 ​hours, about​ 10% longer than​ competitors' models. To raise the lifetime above this level would require a new level of technology not available to West. ​ Nevertheless, he is concerned enough...

  • Consider the below matrixA, which you can copy and paste directly into Matlab.

    Problem #1: Consider the below matrix A, which you can copy and paste directly into Matlab. The matrix contains 3 columns. The first column consists of Test #1 marks, the second column is Test # 2 marks, and the third column is final exam marks for a large linear algebra course. Each row represents a particular student.A = [36 45 75 81 59 73 77 73 73 65 72 78 65 55 83 73 57 78 84 31 60 83...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT