void f() means that f returns nothing. If void returns nothing, then why we use it? What is the main purpose of void?
void f() means that f returns nothing. If void returns nothing, then why we use it? What is the main purpose of void?
Functions are not required to return a value. To tell the compiler that a function does not return a value, a return type of void is used.