0% found this document useful (0 votes)
16 views

C Programming Lab Exercises Part 2

The document contains 3 exercises for a C programming lab: 1) calculate average of elements in an array of size 5, 2) find lowest number in an array of size 5 using a function, 3) calculate sum of a value m times using a function.

Uploaded by

Food Feed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

C Programming Lab Exercises Part 2

The document contains 3 exercises for a C programming lab: 1) calculate average of elements in an array of size 5, 2) find lowest number in an array of size 5 using a function, 3) calculate sum of a value m times using a function.

Uploaded by

Food Feed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

C Programming Lab Exercises

Part 2

1. Write a C program that calculates the average of elements in an array of size 5.


e.g. float arr[] = {10,12,10,12,10};
→ output: 10.8

2. Write a C program that calculates the lowest number in an array of size 5 using
a function.

3. Write a C program that calculates the sum of a value m times using a function.
e.g. summation(n, m) → n + n + n

power(2, 4) → 2 + 2 + 2 + 2 = 8

C Programming Lab Exercises Part 2 1

You might also like