void

The void data type always represents an empty set of values. The only object that can be declared with the type specifier void is a pointer.

When a function does not return a value, you should use void as the type specifier in the function definition and declaration. An argument list for a function taking no arguments is void.

You cannot declare a variable of type void, but you can explicitly convert any expression to type void with the resulting expression used only as one of the following:



Example of a void Declaration