Void Type

The void type, in several programming languages derived from C and Algol68, is the type for the result of a function that returns normally, but does not provide a result value to its caller. Usually such functions are called for their side effects, such as performing some task or writing to their output parameters. The usage of the void type in such context is comparable to that of the syntactic constructs which define subroutines in Visual Basic and procedures in Pascal. It is also similar to the unit type used in functional programming languages and type theory; however, there are some differences in allowable usage, in that the void type is taken to be an empty type with no values. See Unit type#In programming languages for a comparison.

C and C++ also support the pointer to void type (specified as void *), but this is an unrelated notion. Variables of this type are pointers to data of an unspecified type, so in this context (but not the others) void acts as a universal or top type. A program can convert a pointer to any type of data (except a function pointer) to a pointer to void and back to the original type without losing information, which makes these pointers useful for polymorphic functions.

Read more about Void Type:  In C and C++

Famous quotes containing the words void and/or type:

    There is one expanding horror in American life. It is that our long odyssey toward liberty, democracy and freedom-for-all may be achieved in such a way that utopia remains forever closed, and we live in freedom and hell, debased of style, not individual from one another, void of courage, our fear rationalized away.
    Norman Mailer (b. 1923)

    We have two kinds of “conference.” One is that to which the office boy refers when he tells the applicant for a job that Mr. Blevitch is “in conference.” This means that Mr. Blevitch is in good health and reading the paper, but otherwise unoccupied. The other type of “conference” is bona fide in so far as it implies that three or four men are talking together in one room, and don’t want to be disturbed.
    Robert Benchley (1889–1945)