{"id":62346,"date":"2021-10-19T06:24:25","date_gmt":"2021-10-19T06:24:25","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/10\/19\/linked-lists-and-dynamic-memory-allocation\/"},"modified":"2021-10-19T06:24:25","modified_gmt":"2021-10-19T06:24:25","slug":"linked-lists-and-dynamic-memory-allocation","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/10\/19\/linked-lists-and-dynamic-memory-allocation\/","title":{"rendered":"Linked Lists and Dynamic Memory Allocation"},"content":{"rendered":"<p>The program will take in a filename as a command line <br \/>argument. When opening the file, the program should load all entries in to a linked <br \/>list for which each node contains a pointer to a vehicle struct. The program will <br \/>then populate a list of makes based on the data and present it to the user. <br \/>The user should be able to select one of the possible makes via keyboard input (see <br \/>example output). The program will then create a new linked list and copy the data <br \/>pointers of the original list into the temporary linked list which only holds entries <br \/>based on the user\u2019s selection. <br \/>Data Format <br \/> int year <br \/> char *make <br \/> char *model <br \/> char *color <br \/> char *license_plate <br \/>Other Requirements <br \/> The CSV file must be input as a command line argument when running the <br \/>program. <br \/> Nodes must be allocated for each vehicle read in the CSV file. <br \/> Allocated memory must be freed before the program terminates. <br \/> When building a new linked list of the selected make, use the allocated data <br \/>that was already created for the original list. <br \/> Any function declarations, struct declarations, and library includes should be <br \/>in a corresponding header file (with header guard). <br \/> Save your files as problem2.h and problem2.c. <br \/>Example Run <br \/>1. Alfa Romeo <br \/>2. Buick <br \/>3. Chevrolet <br \/>4. Ford <br \/>5. Honda <br \/>Select Make: 3 <br \/>2001 Chevrolet Camaro Z28 (White) LIC#123313 <br \/>2021 Chevrolet Corvette (Black) LIC#453FD3 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The program will take in a filename as a command line argument. When opening the file, the program should load all entries in to a linked list for which each node contains a pointer to a vehicle struct. The program will then populate a list of makes based on the data and present it to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20],"class_list":["post-62346","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-programming"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/62346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=62346"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/62346\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=62346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=62346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=62346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}