What is the name for the first line of the function?

I am writing a worksheet and want to ask students to write a function that looks like this:

isPrime(int number)

What this line is called is a manifest, but I don’t think it is ...

+3
source share
4 answers

May be caused by header, declarationor signature.

The first one goes well with "function declaration", "function header", "function body".

+7
source

function prototype, declarationorsignature

+4
source

bool isPrime(int);

,

bool isPrime(int number) { /* code */ }

- . (C )

, () .

+4

Signature == name, number of parameters, type of parameters, but NOT return type, whereas declaration == signature + return type

-1
source

Source: https://habr.com/ru/post/1728809/


All Articles