Filter by Tags

Difference between NULL and VOID

Votes

3

3 0

What is the difference NULL and VOID?

Sunny Saini
Posted on : Fri, Dec 22, 2017
Views : 145
Comments

Ask Question

If you want to ask question you must LogIn or SignUp
Login SignUp

Answers (2)


2
NULL is a value that is valid for any pointer type. It represents the absence of a value.
A VOID pointer is a type. Any pointer type is convertible to a void pointer hence it can point to any value.
Tanul K Saxena
Wed, Dec 27, 2017
Loading...
Comments

Edit Answer

Submit

2

In C#, void is used as return type and just return type of a function to denote that the function will return NOTHING.

In C#, NOTHING is not equal to null but it is a value which represents an un-instantiated object. null is also used to remove a reference to an object in heap.

So, void is a return type whereas null is a value. Hence, you cannot use null as return type of a function. 

Manish Rawat
Sat, Dec 23, 2017
Loading...
Comments

Edit Answer

Submit
This answer will permanently deleted. Do you really want to delete this Answer ?
To Add your Answer Please
LogIn | SignUp

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp