Write a single program that call three functions in c


Problem

Write a single program that call three functions in C. Have the three functions each create/initialize an array but have

1) One that declares and initialize a large array statically (from data segment),
2) One that declares and initialize the same size array on the stack, and
3) One that creates and initialize the same size array from the heap.

Call each of the subprograms a large number of times (at least 1,000) and output the average time required by each.

Explain your results. For example, what are the trade-offs, in time and space, when the allocation of an arrays occurs in the runtime stack rather than the heap or data/static segment? (Explaining results or analysis is very important).

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a single program that call three functions in c
Reference No:- TGS03276591

Expected delivery within 24 Hours