A group of statements that perform a specific task and is given a particular name is known as function . A function may or may not return a value.
Advantages of using Function:-
. Program size is reduced.
. Support modular programming(i.e it divides the task).
. easy to debugging
. easy for programming
Syntax:-
return-type function-name(datatype var1 , datatype var2, .......);
Below are the some important c program using function:-
> C Program to find area of circle using function.
> C Program to calculate Simple Interest by using function with return type.
> C program to calculate factorial of given number using function.
> C program to calculate the sum of 'n' natural number using function.
Advantages of using Function:-
. Program size is reduced.
. Support modular programming(i.e it divides the task).
. easy to debugging
. easy for programming
Syntax:-
return-type function-name(datatype var1 , datatype var2, .......);
Below are the some important c program using function:-
> C Program to find area of circle using function.
> C Program to calculate Simple Interest by using function with return type.
> C program to calculate factorial of given number using function.
> C program to calculate the sum of 'n' natural number using function.
> C program to input 'n' number in an array and print in reverse order using function.
> C program to search element in an array using function.
> C program to input m*n order matrix and find the sum of all elements using function.
> C program to input m*n order matrix and find the highest and lowest element using function.
> C program to input m*n order matrix and count the number of even and odd elements and find their sum separately using function.
>Write C program to enter a line of text and pass it in function and count the number of vowels present in the text.
Some other important c program:-
Important C program of 1D Array
Important C program of Matrix(2D Array)
Important C program of string
Click Here to download complete notes of C programming.
> C program to search element in an array using function.
> C program to input m*n order matrix and find the sum of all elements using function.
> C program to input m*n order matrix and find the highest and lowest element using function.
> C program to input m*n order matrix and count the number of even and odd elements and find their sum separately using function.
>Write C program to enter a line of text and pass it in function and count the number of vowels present in the text.
Some other important c program:-
Important C program of 1D Array
Important C program of Matrix(2D Array)
Important C program of string
Click Here to download complete notes of C programming.
Comments
Post a Comment