+ 1
void is also a data type so what is the size of void in bytes
5 Respuestas
+ 1
0 bytes. There is no size.
In other cases there will be compilation errors. Void type doesn't store any value, object or memory.
You can't write like this:
Void object;
0
0 bytes n it won't allocate memory at all
0
But it is a data type and it's having some properties so to store that how it has to work it will take some memory.
0
you can verify by sizeof(void);
0
0 bytes, it won't allocate any memory