answersLogoWhite

0

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

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What use of void data type in c plus plus?

doesn't return the value.


Application of void data type in c plus plus programming language?

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.


What are the three most common data types used in c?

Pick any three: int, char, long, void, char *, void *


What TYPES of return values are allowed?

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.


Why void is preemptive data type?

void isn't an actual data-type, preemptive(?) or otherwise.


Empty data types in C?

Void - is empty data type in C


What are the 'data types' provided in c?

1. void 2. int 3. float 4. double 5. char


What is the use of void data types?

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'


First argument of fwrite function is typecast to?

void * wlen= fwrite ((void *)&data, 1, sizeof (data), file); if (wlen != sizeof (data)) ... error ...


How do you Write a function prototype for a function named printStars that accepts no arguments and returns no data?

void printStarts (void);


Is void a data type in c?

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.


How does the use of the 'void' keyword differ in C plus plus vs. C?

It doesn't. Void has the same meaning in both.