If a method call is void, that means it will not return a data value to a program that calls it. Otherwise, the method is expected to return a data value of some sort.
For example, if I have a method called print() that is void, and the body of the method has a command to print a word to the screen, the method will run that command and end.
However, if I have a method called add(int x, int y) that takes two numbers and adds them together, the program calling this method wants an answer back. So this method is not void.
A function is a method that returns a value other than void. Methods includes functions, subroutines, constructors, destructors, and properties.
void printStarts (void);
what is void data type Void is an empty data type normally used as a return type in C/C++, C#, Java functions/methods to declare that no value will be return by the function. The another use of void is to declare the pointer in C/C++ whe It is not sure that what data type will be addressed by the pointer. eg: void *p; Here p can hold the address of int or float or char or long int or double.
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer
here is an example of a minimal function, I hope this helps: void foo (void) {}
A function is a method that returns a value other than void. Methods includes functions, subroutines, constructors, destructors, and properties.
void printStarts (void);
It can be done via its address, for example: void function (void (*callback)(void)) { (*callback)(); }
I have no idea. However, in theory there is a difference.
In programming, "void" is a keyword used to indicate that a function does not return any value. "VOID" is a term generally used to describe something empty, null, or without substance.
what is void data type Void is an empty data type normally used as a return type in C/C++, C#, Java functions/methods to declare that no value will be return by the function. The another use of void is to declare the pointer in C/C++ whe It is not sure that what data type will be addressed by the pointer. eg: void *p; Here p can hold the address of int or float or char or long int or double.
You don't use 'VOID', but 'void'. It means different things, such as:- void as function type means no return value- void as function parameter means no parameters- 'void *' as pointer-types means generic pointer
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer
here is an example of a minimal function, I hope this helps: void foo (void) {}
when we declare any function with void,it doesnt return any value
the program contains the which are coding like as our header file ,void main,library function etc.
Predefined functions are built-in functions that perform standard operations and that generally do not depend on any classes. A predefined void function is simply a predefined function that has no return value. An example of a predefined void function is the abort() function which typically has the following signature: void abort(void);