user
Generate a programming exercise for someone learning C.

Answer:
assistant
Write a program in C to calculate the sum of all the elements of an array and print the result. The array should be defined by the user by specifying the size.