Alex Rivera | Logout

Is void a data type in C?

Asked 2010-08-15T14:07:30.317
74

Is void a data type in the C programming language? If so, what type of values can it store? If we have int, float, char, etc., to store values, why is void needed? And what is the range of void?

Edit
Report

1 Answer

8

The C Standard says that void is an incomplete type that cannot be completed (unlike other incomplete types that can be completed). This means you cannot apply the sizeof operator to void, but you can have a pointer to an incomplete type.

answered 2012-12-27T20:11:54.013

Your Answer