2080 8

C Programming20805 marksUser defined functions

Write a program to compute the sum of first 10 even numbers using function.

Write a program to compute the sum of first 10 even numbers using function. [5]

The first 10 even numbers are: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20. A separate function evenSum() is defined to compute and return their sum, which is then called from main(). --- --- Iteration i sum (before) sum (after) count ------------------------------------------------ 1 2 0 2 1 2 4 2 6 2 3 ...

Up nextWhat is dynamic memory allocation? Explain with a suitable program.