What is a Specific Defination of Functions in programing language?
Sunny K
2008-01-05 03:40:44 UTC
What is a Specific Defination of Functions in programing language?
Six answers:
shree
2008-01-05 03:48:35 UTC
function definition:
function return datatype function name(arg1,arg2,.....)
{
sts;
:
return value(this is not needed when fn return datatype is void)
}
fretless
2008-01-05 03:49:12 UTC
It depends on the programming language but the main concept is that functions accept an input (some variables) and provide (return) an output (other variables).
According to wikipedia:
In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of code within a larger program, which performs a specific task and can be relatively independent of the remaining code. The syntax of many programming languages includes support for creating self contained subroutines, and for calling and returning from them.
darshanZ
2008-01-05 03:55:21 UTC
Functions are blocks of reusable code that can be passed parameters and can return a value. For example, the getProperty function is passed the name of a property and the instance name of a movie clip, and it returns the value of the property. The getVersion function returns the version of the Flash Player currently playing the movie.
anonymous
2008-01-05 21:21:14 UTC
Functions are the set of instructions which as a whole performs a particular task. For eg. if I write a function like sum() as:
sum(int n)
{
int a = 0,i;
for(i=0;i<=n;i++)
{
a = a + i;
}
return a;
}
Now when u will use this function, it is going to return you the sum of 'n' numbers. So this is a function which is performing a particular task of summing 'n' numbers.
cool_clearwater
2008-01-05 03:49:06 UTC
reusable pieces of code that carry out often repeated instructions (e.g. convert farenheit to centigrade) that are usualy written at the begining of the program and accessed (or called) by using their name followed by () e.g. convert()
anonymous
2016-12-01 01:49:17 UTC
applications are elementary to apply; they permit complicated courses to be parcelled up into small blocks, each and each of that's less demanding to place in writing, study, and safeguard. applications are the development blocks of c.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.