Function in Programming Language And Their Features
Function in Programming Language And Their Features:- Hello friends, today we are going to talk about function. If you are from a programming background then you must know about function. In this article, we are going to talk about function and their feature in our article. Friends, you can understand function like, suppose you have a big problem and you have to solve that problem. Then there are 2 possibilities to solve that problem. First, you have to solve the entire problem in 1 time. Another is that you can break this problem in the partition and then you can solve that problem.
If you will solve the problem in the partition then the problem will be solved easily. But if you will try to solve the entire problem at once it will more time. The same thing happens with the function also. Let see the definition of Function.
Function is a piece of code that is used to solve a particular problem. The function is like a procedure which returns a value or it is a procedure which does not return a value. One of the most useful benefits of the function is you can use it as many times you want in your program.
There are lots of libraries used in a programming language which contain function and you use this function in your programming language. These functions are like you use printf ,scanf in c language they function which is used in a programming language. Every programming language has their own syntax.
There are two types of function
-Standard Library Function
-User Defined Function
Sometimes you have to define your own function. If you want to solve the problem then you have to use a user-defined function. Every time you have to create a user-defined function. In every programming language, there is a syntax that is used in every programming.
Syntax:-
function function name()
{
}
Example:-
function gaurav()
{
printf("hello user");
}
So that is , it was all about function. I hope you will like this post. If you have any question you can comment in the comment we will try to solve your problem.
If you will solve the problem in the partition then the problem will be solved easily. But if you will try to solve the entire problem at once it will more time. The same thing happens with the function also. Let see the definition of Function.
What is Function
Function is a piece of code that is used to solve a particular problem. The function is like a procedure which returns a value or it is a procedure which does not return a value. One of the most useful benefits of the function is you can use it as many times you want in your program.
There are lots of libraries used in a programming language which contain function and you use this function in your programming language. These functions are like you use printf ,scanf in c language they function which is used in a programming language. Every programming language has their own syntax.
There are two types of function
-Standard Library Function
-User Defined Function
-Standard Library Function:-
The standard library function is a collection of function which is used in the program. You can use these function in your program. So you don't need to write code again and again. It saves your time and makes smooth code and efficient program. Examples are: printf(), Scanf() are the example of the standard function.-User Defined Function
Sometimes you have to define your own function. If you want to solve the problem then you have to use a user-defined function. Every time you have to create a user-defined function. In every programming language, there is a syntax that is used in every programming.
Syntax:-
function function name()
{
}
Example:-
function gaurav()
{
printf("hello user");
}
Last Words
So that is , it was all about function. I hope you will like this post. If you have any question you can comment in the comment we will try to solve your problem.
Comments
Post a Comment