+ 1

void is also a data type so what is the size of void in bytes

18th Jun 2016, 4:33 AM
Kundan Kumar
Kundan Kumar - avatar
5 Answers
+ 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;
18th Jun 2016, 4:51 AM
Dmitry Pudov
Dmitry Pudov - avatar
0
0 bytes n it won't allocate memory at all
19th Jun 2016, 7:46 AM
deepa
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.
19th Jun 2016, 9:43 AM
Kundan Kumar
Kundan Kumar - avatar
0
you can verify by sizeof(void);
20th Jun 2016, 7:20 AM
Cristi
Cristi - avatar
0
0 bytes, it won't allocate any memory
2nd Jul 2016, 8:57 AM
Joyx Kish
Joyx Kish - avatar