A function that returns no values to the program that calls it is _____ A. not allowed in C++ B. type void C. type empty D. type barren

not allowed in C++
type void
type empty
type barren

The correct answer is: B. type void.

A function that returns no values to the program that calls it is a function of type void. This means that the function does not return a value to the caller. The function can still have parameters, but the caller cannot use the value of the parameters after the function has been called.

Option A is incorrect because it is possible to have functions that return no values in C++.

Option C is incorrect because there is no type called “empty” in C++.

Option D is incorrect because there is no type called “barren” in C++.

Here is an example of a function that returns no values:

c++
void printHello() {
std::cout << "Hello, world!";
}

This function does not return a value. The caller can call the function, but it cannot use the value of the function after the function has been called.