Write a C program that creates two arrays of integers, one on the stack and one on the heap. You will loop through these arrays and populate them with values (any value is fine). You will then loop through these arrays again and print each value. Your output should look something like “Value in index 1 is 100 from stack array and 100 from heap array.” Do not forget to print newlines. Do not forget to de-allocate any memory you allocate. Write a program that allocates an array on the heap and then iterates through the heap using pointer arithmetic. Print the item as in part 2 at each iteration. Loop backwards through the array using pointer arithmetic and print as well.
Get Free Quote!
280 Experts Online