A function or method is basically a block of statements that perform a specific task. For example, you are building an application in C language and in one of your program, you need to perform the same task more than once. In such case, you have 2 options:
A) Use the same set of statements every time you want to perform the task
B) Create a function/Method to perform that task, and just call it when you need to perform that task.
Using option (B) is always a good practice and a good programmer always uses functions while writing codes in C or any other programming language
- Write C program to check even or odd using functions
- Write C to check prime and armstrong numbers using function
- Write C program to find cube of a number using function
- Write C Program to convert binary number to decimal
- Write C Program to convert decimal number to binary using function
- Write C program to find Length of the String by passing String/Character
- Write C program to print all strong numbers between 2 numbers
- Write C program to find prime numbers in given range using functions
- Write C program to find diameter, circumference and area of circle using function
- Write C program to print perfect numbers between given interval using function
- Write C program to find power of a number using recursion
- Write C program to find sum of natural numbers in given range using recursion
- Write C program to print even or odd numbers in given range using recursion
- Write C program to find reverse of a number using recursion
- Write C program to find LCM of two numbers using recursion
- Write C program to find HCF of two numbers using recursion
- Write C program to print elements of array using recursion
- Write C program to find sum of array elements using recursion
- Write C program to generate nth fibonacci term using recursion
- Write C program to find factorial of a number using recursion
- Write C program to check palindrome number using recursion
- Write C program to find maximum and minimum elements in array using recursion