What is the void data type?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Energy Agency, Lives in Paris, France.
The data type void actually refers to an object that does not have a value of any type. We have already seen examples of its use when we have defined functions that return no value, i.e. functions which only print a message and have no value to return. Such a function is used for its side effect and not for its value.
2023-05-05 14:10:01
评论(499)
Helpful(122)
Helpful
Helpful(2)

Benjamin Lee
QuesHub.com delivers expert answers and knowledge to you.
The data type void actually refers to an object that does not have a value of any type. We have already seen examples of its use when we have defined functions that return no value, i.e. functions which only print a message and have no value to return. Such a function is used for its side effect and not for its value.