answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

"void" is not a data type but a keyword that indicates the absence of data type.

// cannot create a variable of type "void" because "void" is not a type

// the following statement is incorrect:

void x;

// can use keyword "void" to say that a function takes no parameters

int function_without_parameters(void);

// can use keyword "void" to say that a function does not return a result

void function_without_result(int);

// can use keyword "void" to say that we do not know what kind of data type a pointer points to

void* pointer_to_unknown_datatype;

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Application of void data type in c plus plus programming language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is C plus plus an application program?

No. C++ is a computer language. The development system supporting it is a compiler, linker, editor, debugger, etc.No it is a programming language.


When was Plus - programming language - created?

Plus - programming language - was created in 1976.


Is the ccc plus language for programming?

CCC+ is a sovereign credit rating. It is not a programming language.


What is the use of c plus plus in banks?

Programming language.


Who is the owner of c plus plus language?

Bjarne Stroustrup is the author of C++. However, no one "owns" this language.


What has the author William Ford written?

William. Ford has written: 'A description of scenery in the Lake District intended as a guide to strangers' 'Past present imperfect' 'Assembly language and systems programming for the M68000 family' -- subject(s): Motorola 68000 (Microprocessor), Programming, Assembler language (Computer program language) 'Data structures with C (plus plus)' 'The MC68000: assembly language and systems programming' -- subject(s): Motorola 68000 (Microprocessor), Programming, Assembler language (Computer program language)


What is different between primitive date type and non primitive data type in c plus plus programming language?

A primitive data type is built into the language - int, char, long, etc. A non-primitive data type is am abstract data type that is built out of primitive data types - linked list, queue, stack, etc.


Who is founder of C plus plus programming language?

Bjorn Stroustrup


Is c plus plus an unstructured programming language?

No, BASIC is, for example.


Is score a reserved word in the C plus plus programming language?

No.


Who designed the C plus plus programming language?

Bjarne Stroustrup


Which type of language c plus plus is?

It's an imperative, procedural and Object-Oriented programming language.