bool doit(int list[], int size);
The function doit
takes an array of integers as first parameter, and the size of the array (which is an integer) as second parameter. It returns a boolean (true
or false
).
This sort of function prototype is typically used to access each element of the array within a for
loop (with size
as terminating condition). The boolean return value could inform of the presence or absence of some value in the array for example, or if some work could or could not be performed.
1
solved C++ Function Prototype? [closed]