Computer Science, asked by sunilkumar197625, 10 months ago

how function declaration ends?​

Answers

Answered by sefaligupta2017
6

A function declaration tells the compiler about a function name and how to call the function. The actual body of the function can be defined separately.

A function declaration has the following parts −

return_type function_name( parameter list );

For the above defined function max(), the function declaration is as follows −

int max(int num1, int num2);

Parameter names are not important in function declaration only their type is required, so the following is also a valid declaration −

int max(int, int);

Function declaration is required when you define a function in one source file and you call that function in another file. In such case, you should declare the function at the top of the file calling the function.

In java, it ends by calling a method or by putting {}

Answered by shivamchavan2003843
11

Answer:

A function is a group of statements that together perform a task. ... A function declaration tells the compiler about a function's name, return type, and parameters. A function definition provides the actual body of the function. The C standard library provides numerous built-in functions that your program can call.

hope it helps you ✔✔☺☺☺

Similar questions