Starting from:
$35

$29

Computer Programming Homework #10 Solution

Question (100 points):




You have date.txt input file which includes from 1 to 1.000.000 integers.




(10 points) Write a C programming function which read each line from “data.txt” file.



(60 points) Write a C programming function which finds prime numbers in data.txt file:



(25 points) Record all these numbers (data.txt) into Linked-List, find and show all prime numbers.



(25 points) Record all these numbers (data.txt) into an array and use dynamic memory allocation principle, find and show all prime numbers.



(30 points- each 10 points) Compare the calculation time of question 2.a and question 2.b according to values of data.txt:



Between 1 and 500.000
Between 1 and 750.000
Between 1 and 1.000.000.



Note: the calculation time is the running time of the program to find all results and then finish.




Write your calculation time results of questions 3.1, 3.2 and 3.3 of question 2.a and question 2.b into output_prime_LiknedList.txt and output_prime_dynamic_array.txt, respectively.




Note: Three results should be for each line in both of the output files (questions 3.1, 3.2 and 3.3 ).




Show your all results and screenshots of your running programs in HW10.pdf.




(10 points) Calculate the file written time for both of output_prime_LiknedList.txt and output_prime_dynamic_array.txt files for data between 1 and 1.000.000. Show your all results and screenshots of your running programs in HW10.pdf.



For any questions: Mrs Altan Akin, tualtan@gtu.edu.tr Good Luck!




I

Your submission (studentnumber_hw10.zip) should include the following files and




date.txt, screenshots of your running programs step by step with explanations as a HW10.pdf file, output_even_LiknedList.txt and output_even_dynamicarray.txt, HW10_<student_name_<studentSurname_<student number_answer.c




“//” you put comment line before each question in your source code (It can be English or Turkish but not both of languages!)

More products