Posted in All Posts, Semester 2

Sem 2 – ACP Unit 1 Programs

ACP – Advanced C Programming

Unit 1 : Using Functions

1. Program to calculate average temperature of five days. Create temp() function.
Download | View Code

2. Program that uses recursive function fibo() that generates a Fibonacci series containing N elements.
Download | View Code

3. Program that uses a recursive function fact() that finds the factorial of a given number N.
Download | View Code

4. Program to find if the given no. is prime or not. The function should accept the number as argument and return if the no. is prime or not.
Download | View Code

5. Program that uses a function which accepts a character array as argument from the user. The function should print the ASCII equivalent of all the characters in the string.
Download | View Code

6. Program with a function which accepts a character array as argument from the user. The function should convert all the lowercase characters into uppercase case.
Method 1 – Download | View Code
Method 2 – Download | View Code

7. Program that uses a function that accepts an array of integer values. The function should find the number which divides all the other numbers.
Download | View Code

8. Program that uses function digit(n,k) that return the value of the kth digit from the right of the number n.
For eg. The function call digit(254693,2) should return 9.
Download | View Code

9. Program that uses a user-defined function to perform
a) Square of a number
b) Area of a square
c) Reverse the number
Download | View Code

10. Program that uses a function to check whether an entered number is palindrome or not.
Download | View Code

Download All

We hope that you found this article to be helpful.
Please share your thoughts in the Comments Section.

If you liked this article, then please like our Facebook page.

Suggested Reading

2 thoughts on “Sem 2 – ACP Unit 1 Programs

Comment your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.