203k views
5 votes
What does the following function return? void index_of_smallest(const double all, int startindex, int numberOfSlots); A. a double B, numberOflots C. an integer D. nothing

1 Answer

3 votes

Answer:

nothing

Step-by-step explanation:

Because the return type of the function is void. void means does not return any thing.

The syntax of the function:

type name( argument_1, argument_2,......)

{

statement;

}

in the declaration the type define the return type of the function.

it can be int, float, double, char, void etc.

For example:

int count( int index);

the return type of above function is int. So, it return integer.

similarly,

void count(int index);

it return type is void. So, it does not return any thing.

User Manojpt
by
5.0k points