void data type is used in function declaration. It can be explained by examle
void add(int,int);
this will tell the compiler that no value is going to be returned by the function.
int add(int,int);
this indicates that an integer type value will be returned by the function
doesn't return the value.
The voiddata type is used when a function doesn't return any value, and/or when it has no parameters at all. Pointer type 'void *' is a generic pointer.A void pointer is used when it needs to be assigned to different data types later on in a program. Since it avoids type checking, void pointers should be used with care.
Pick any three: int, char, long, void, char *, void *
Apart from basic Data types (int , char , float and double ) you can even return Class Objects.Nearly any type of Data can be returned by a function including pointers to void data type.
void isn't an actual data-type, preemptive(?) or otherwise.
Void - is empty data type in C
1. void 2. int 3. float 4. double 5. char
When a function declares it returns void, it means it does not return anything. Sometimes the function doesn't need to return anything, so using void is convenient. In C: using voidinstead of parameters means 'there's no parameters'
void * wlen= fwrite ((void *)&data, 1, sizeof (data), file); if (wlen != sizeof (data)) ... error ...
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.
It doesn't. Void has the same meaning in both.