Answers for "why do we use void if it returns nothing"

0

why do we use void if it returns nothing

void is a type to represent nothing. That is a subtle difference : the representation is still required, even though it represents nothing. This type is used as function's return type which returns nothing. This is also used to represent generic data, when it is used as void* .
Posted by: Guest on March-18-2021

Browse Popular Code Answers by Language