Computer Science, asked by anand6864, 1 year ago

what do you mean by function?Name some of he function.

Answers

Answered by Anonymous
15
hey buddy
here's ur answer °

FUNCTION
logically related instructions organized into a group are known as functions .

syntax:
access_specifier modifier returnType functionName(parameter_list)
{
function_body
return;
}

ADVANTAGES of FUNCTIONS ..

1) to cope up with complexity
2) hiding details
3) Re-use
4) economises the programming code.
___________________________________

FUNCTION SIGNATURE OR PROTOTYPE:
it indicates the function name , the no.of parameters passed to the function, data type of the parameters, the order of the parameters, and the return data type .

syntax:
returnType functionName (parameter_list)

example....
define the function prototype to find the product of X raised to you times.

Name of the function : pow ( )
no.of parameter passed : 2
data type of the parameters : double
order of the parameters : double, double
return and datatype : double

•°• double pow (double, double);
___________________________________

here I'm sending the pic of 2 java programs in which functions r used ....
so maybe ull be able 2 understand better .
^-^ hope it helps u...
Thank huh !
Attachments:
Answered by shashikantkumar2758
18

Answer:

function is a predefined formula date performance calculation using specific values in a particular order. function save time and eliminate the chance of writing wrong formulas.

e.g:-Sum(),product(),Average(),Max(),Min()amd Count().

Similar questions