Question: I'm not sure what you're asking a) (16 points) Use the code below and run one function at a time with the required values for

 I'm not sure what you're asking a) (16 points) Use the
code below and run one function at a time with the required
values for N and record the actual time (e.g. seconds) it takes.
I'm not sure what you're asking

a) (16 points) Use the code below and run one function at a time with the required values for N and record the actual time (e.g. seconds) it takes. You can simply look at your watch to see the how long it takes. Use a desktop or laptop. DO NOT use an online complier. Answer the questions below. 1. runtime_print has the same code as runtime_increment except that instruction 'res = res+1' was replaced with 'print... instruction. Why does runtime_print take more time to run? Answer: 2. runtime_print_long has the same code as runtime_print except that it prints the string given as argument instead of 'A'. Why does runtime_print_long take more time to run? Answer: 3. After you record the time for runtime_increment, pay attention to how the performance gets worse as n gets larger. Do you think a program with such time complexity would be feasible for an application where N is a million? Answer: 4. After you record the time for runtime_pow, notice how much faster the performance deteriorates (i.e. it takes too long to run even for small values of N such as 20). Compare that with runtime_increment and runtime_print (compare both the actual time, and the time complexity). In the table below the code fill in the time complexity (as ) and the approximate "clock time" each function takes to run. You do NOT need to show your derivations for computing . You also do not need to report the exact time. You can say: "s 1 sec", "a few seconds", "a few minutes", "more than 15 minutes" #include void runtime_increment (int N); void runtime_print (int n); void runtime_print_long (int n, char* long_str); int main(void) { // call the functions here and record the time they take. int L = 1000, i; char str(L+1]; for(i=0; i void runtime_increment (int n) ; void runtime_print(int N); void runtime_print_long(int n, char* long_str); int main(void) { // call the functions here and record the time they take. int L - 1000, i; char str[L+1]; for(i=0; i void runtime_increment (int n) ; void runtime_print(int N); void runtime_print_long(int n, char* long_str); int main(void) { // call the functions here and record the time they take. int L - 1000, i; char str[L+1]; for(i=0; i

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!