1.Write a program to find the sum of the values in a numeric field of the elements of an array of structures.
2.The total number of moves of disks required to solve the Tower of Hanoi problem with n disks is expressed in the following equation:
Hn = 2Hn-1 +1, for n>1 and H1 = 1.
Write a program that finds the total number of moves for any given number n of disks using global variables, recursion and static variables separately. Write three different functions that are called from the ‘main’.