C Programming - Pointers - Discussion

Discussion Forum : Pointers - General Questions (Q.No. 1)
1.
What is (void*)0?
Representation of NULL pointer
Representation of void pointer
Error
None of above
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
124 comments Page 7 of 13.

Velmurugan said:   1 decade ago
I think NULL pointer and void pointer are entirely different and so NULL pointer can't be represented through void pointer.

Kutti said:   1 decade ago
0 used to any place null value. Then 0 used no any value. So (void*) 0 is null pointer. Example 1*0=0. This mean no value.

Prema said:   1 decade ago
I thick (void*) type casting, if we specify (void) 0 it is void pointer, now we specify (void*) 0 so it is null pointer.

Dinesh said:   1 decade ago
It refers null pointer. Because the return type void is mentioning the null (nothing). So it can be refered like this.

Harsh said:   1 decade ago
NULL pointer can be portably expressed as the integer value 0 converted implicitly or explicitly to the type void*.

Nisha sahu said:   1 decade ago
In function we are using void as return type, in pointer why we are not using void as return type instead of void*.

Srr said:   1 decade ago
Void means no return type and * means finding the address of return type. So that is represented as null pointer.

Kishor said:   1 decade ago
Ii is void pointer if the declaration is void *
But in the e.g. it is given (void *)0 Hence it is null pointer.

Shubham patra said:   2 years ago
Because it is not pointing to any memory address therefore it's a null pointer.

And we also avoid parenthesis.
(3)

Parveen said:   1 decade ago
i think here (void*) is just like type casting of 0 and * is used to represent 0. Hence it is null pointer


Post your comments here:

Your comments will be displayed after verification.