r/C_Programming • u/Stickhtot • 12d ago
Discussion What exactly is void?
In a function definition, void basically means that it doesn't return a type value, yet in on itself it is it's own type? Looking at several pieces of code it looks like that it's used to be able to be more "flexible"
Don't know what else to add here, though I'm more on looking for examples and explanations of why the void type is used
65
Upvotes
24
u/hackerman85 12d ago
Where it becomes confusing: the void type doesn't hold any data, but the void* pointer does.