subject
Computers and Technology, 26.03.2021 20:20 ani61

You have been given 7 C files, each has the same logic, expressed in different ways. Each of the 7 is incomplete, marked by TBD. You must replace each TBD entry with appropriate C code. You must NOT alter any of the existing lines. You are only allowed to replace each TBD line with one or two new lines. Each of the 7 C programs do exactly the same task. Given a list of numbers on the command line, they find the smallest positive number and the largest negative number. You do not have to add error checking. You can safely assume (1) all numbers are given nicely as integers on the command line, (2) both positive and negative numbers will always be present, and (3) all numbers will be in the range of -1,000 to +1,000. The output from all 7 will be the same for the same arguments. For example, the smallest positive number in the list (34 82-4-22 13-83 0 3) is 3, and the largest negative number is -4. The 'doit. sh' script is available to use if you choose. It runs on Linux and will compile and run each of the 7 C programs for you. The script is optional and does not need to be submitted. Part I: Implementation (5 points each, 35 points). Get each of the 7 C files to compile and produce the results as given above. Show the output from all 7 executables. Part II: Discussion (5 points each, 25 points). (a) Which version(s) are unsafe when multi-threaded? Why? (b) Which version is the hardest to read and maintain? Why? (c) Which version has the most redundant code? Why? (d) Which version(s) are closest to call-by-name? Why? (e) Which version(s) are closest to call-by-reference? Why? Bonus: Implement in Python (5 points). You must calculate the smallest positive and largest negative numbers. You only need to implement one version, and submit one mmm. py file. A partial solution has been provided for you. As above, you can only replace TBD lines.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
In a file-oriented information system, a work file stores relatively permanent data about an entity is created and saved for backup and recovery purposes stores records that contain day-to-day business and operational data is a temporary file created by an information system for a single task
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
Which statement is true of web-based social media? a.they allow consumers to interact with and update content. b.they cannot be updated easily, as compared to print media. c.they are expensive to produce and maintain, as compared to print and television. d.they can exist independent of the internet.
Answers: 1
You know the right answer?
You have been given 7 C files, each has the same logic, expressed in different ways. Each of the 7 i...
Questions
question
History, 11.11.2020 06:50
question
Mathematics, 11.11.2020 06:50
question
Mathematics, 11.11.2020 06:50
question
English, 11.11.2020 06:50
question
Business, 11.11.2020 06:50
question
Biology, 11.11.2020 06:50
Questions on the website: 13722363