C function examples
C Programs - Function
Practice C programs based on functions, user-defined functions, library functions, and recursion.
Topic library
17
practice programs
Topic overview
A function is a collection of statements that performs a specific task.
C functions are usually grouped into two types: standard library functions and user-defined functions.
Functions improve modularity, reduce repetition, and make recursion possible for problems such as factorials, Fibonacci numbers, and ranges.
Practice list
Function programs in C
- 1C Program to find square of a number
- 2C Program to find cube of a number
- 3C Program to find circumference, diameter and area of a circle
- 4C Program to find maximum and minimum number
- 5C Program to find maximum and minimum number in an array
- 6C Program to check if a number is even or odd in a given interval
- 7C Program to check if a number is prime or not
- 8C Program to check if a number is prime or not in a given interval
- 9C Program to check if a number is armstrong or not
- 10C Program to print sum of first natural numbers using recursion
- 11C Program to print all natural number between given interval using recursion
- 12C Program to print all even and odd number in a given interval using recursion
- 13C Program to find sum of numbers in a given interval using recursion
- 14C program to find reverse of a number using recursion
- 15C program to check if a number is palindrome using recursion
- 16C program to find factorial of a number using recursion
- 17C program to get nth Fibonacci term using recursion