+ 3

is it possible to declare void data type variable..?

example ...void x=anything;

28th Jan 2018, 8:41 AM
ijhar
ijhar - avatar
7 Answers
+ 2
the purpose of a type is to specify how data are represented in memory. Void is nothing, there is no storage space defined, so you can't store data, so having a variable of type void does not make sense...
28th Jan 2018, 9:15 AM
ifl
ifl - avatar
+ 3
There is a void pointer, but I don't think you should use it yet.
28th Jan 2018, 9:55 AM
BlazingMagpie
BlazingMagpie - avatar
+ 2
Because it's nothing. You can't assign a value, so why would you need it?
28th Jan 2018, 8:58 AM
Timon Paßlick
+ 1
can u explain y not
28th Jan 2018, 8:57 AM
ijhar
ijhar - avatar
+ 1
thanks
28th Jan 2018, 9:20 AM
ijhar
ijhar - avatar
0
no
16th Feb 2018, 7:40 AM
Dinesh kumar
- 1
Nope.
28th Jan 2018, 8:56 AM
Timon Paßlick