Question
I can not upload test documents with txt file so I just paste it. Test_1 399 49051 73854 64619 20400 5988 3180 4887 3174 25189
I can not upload test documents with txt file so I just paste it.
Test_1
399 49051 73854 64619 20400 5988 3180 4887 3174 25189 7884 11756 9546 59912 74673 2238 14930 38099 71185 13704 4483 72218 21055 1654 46987 18561 1880 24927 23762 4211 16652 2360 11943 48071 28030 72418 2673 57030 22093 8162 31879 5303 3597 47538 46421 1146 20052 72360 1819 12828 59911 8215 67586 67017 12781 33759 15959 4772 2144 53267 4412 7843 1272 2164 3190 50793 942 15038 65606 15207 14939 14400 1732 1806 63834 21145 15486 2563 43247 18554 18571 13892 59708 43393 690 25053 4418 52231 56829 72378 19110 3263 2864 67559 51906 4902 4813 843 1576 3687 6689 1951 15398 2110 45719 70596 58864 17130 18537 1193 4155 22273 49241 16842 33704 13140 29623 7353 1774 64953 20655 3175 50760 953 9346 14741 10093 18175 60334 36855 46399 1636 4087 18748 66156 17058 1103 14036 57890 3513 16487 2443 21473 2618 57339 37199 58173 1613 10177 70325 74915 44497 58321 2233 4874 11152 8354 14645 19917 16635 66441 62348 60874 65578 24675 15088 34638 6460 55823 66875 1292 21411 1827 826 3672 4205 2352 64431 25367 13629 764 30984 59655 42566 23489 20177 4821 22132 38997 3596 24476 24487 4707 27406 13928 13616 41104 70800 3396 57591 24160 20724 1060 2981 14871 580 5879 5527 3338 39013 25320 19664 74934 58536 3682 62921 5247 57323 3205 49718 34734 9775 69717 27404 9587 527 1900 32684 3859 5017 22348 2736 9287 4255 17568 10273 3623 14267 4203 2101 9442 42550 4671 1676 7807 61423 24484 3602 17571 1469 42683 2293 3291 52000 12436 2990 14581 2572 40127 2486 39795 941 2421 9403 1105 36835 74615 67448 72744 5957 2049 8411 28192 70586 36085 73957 2185 21511 19645 21154 2139 60540 41321 60217 38788 30599 3474 30171 28198 18689 32533 65163 4896 10029 18942 8292 30525 20892 3024 2116 68635 34353 20930 4979 72985 74764 36166 42441 54306 61956 65005 16534 785 4581 29887 4826 3117 1688 22556 18379 540 38764 1775 6473 21379 4182 30029 13267 41346 35828 38397 3311 16185 18265 46371 1487 41140 24673 19660 18349 1927 42423 38303 2475 31742 18586 2661 66858 43249 59792 53121 59087 4734 33881 1759 1433 17965 5847 3103 4769 3978 1190 19604 42191 7376 2529 15115 1963 60729 50244 6278 5526 68590 28215 4549 1892 22691 16871 1334 19205 898 23412 22703 24214 59923 8124 3192 1648 22728 1828 33199 4509 8858 22242 2147 1256 2533 73762 2748 42372
4.1 Instructions You need to write the code by yourself. Your implementation must use C/C++ and your code must run on the Linux machine general.asu.edu. Please refer to the programming guide (available under the Assignments folder on Blackboard) for using the general.asu.edu server, as well as compiling and running C/C++ code under Linux. For this question, you need to provide a Makefile that compiles your program to an executable named a2 that runs on the Linux machine general.asu.edu. Our TA will write a script to compile and run all student submissions; therefore, exccuting the command make in the Code folder must produce the executable a2 also located in the Code folder. 4.2 Requirements In this question, you will write a serial program that executes a sequence of commands that operate on individual files. Valid commands includo: Start Name, wherc Name is a character string of maximum length 20 alphabetic characters represcnting the name of the data file (Name.txt). The structure of Name.txt is an integer N indicating the total number of data entries contained in this file, followed by N additional lines of integers (the actual data entries). This command first reads N from the file Name.txt, dynamically allocates an array of integers of size N (if it has not already been allocated), and then reads the remaining N data entries into the array. The commands that follow until thc End command arc to be applicd to the resulting data array. The output of the Start command is Processing data from: Name.txt End Name, which indicates the end of the processing for the data in file Name.txt. The Start and End commands will always come in pairs with matching names. Any memory dynamically allocated for Name must be freed on an End command. The output of the End command is End of processing data from: Name.txtStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started