Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Generate a programming exercise for someone learning C.

### Response:
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.