Question: Write C programs to implement the reality we discussed last week. See the details of reality in the lecture notes: reality_1 on page 4, reality_3

 Write C programs to implement the reality we discussed last week.

Write C programs to implement the reality we discussed last week. See the details of reality in the lecture notes: reality_1 on page 4, reality_3 on page 8 and reality_4 on page 12 . Use the skeleton code reality.e for reality 1 and 3 and reality.s for reality 4. The skeleton code is just a guideline for those who are not familiar with or don't want to write your own. You may change the model. Use Makefile for managing and compiling. When reality is executed, your program will make necessary decisions and print the following: $ reality 5 reality_1_example_1_float: -50000.000000 f*-2500000000.000000 > 0 reality 1 example_1_int: i-40000 i*i-1600000000 > 0 reality_1_example_1_int: 1-50000 ii-1794967296 3.140000 fun(1) -> 3.140000 fun(2) -> 3.140000 fun (3) -> 2.000001 fun (4) -> 3.140000 Segmentation fault (core dumped) $ When reality4 is executed, your program will compute the time taken to run the two functions copyij) and copyji0, and print them as follows: $ reality copyijo: dim-2048: elapsed-0.013 secs copyji(): dim-2048: elapsed-0.127 secs Note: the elpased times are just samples. It's very likely that your numbers will be different from these since your machine is different from the machine used to get the sample numbers above. For example, last Thursday, you saw different numbers when I executed the code on my Linux box

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!