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 2 of 13.

Sree said:   1 decade ago
The void data type has no values.

Example:

int a=10; //right
void b=20;//wrong

pointer
a[address of 10]--------->10

pointer
b[address]---------> NULL (no value,no address so null)

So void is a representation of NULL.

Note: void *b; //right (no value, but we can store address)

Arpan said:   1 decade ago
I think it is void pointer!!!

I null pointer is something which refers to a memory block which already has been deallocated (by free() or something like that).

Anil said:   1 decade ago
This is nothing but here, we are pointing to a void memory.

Srivibha said:   1 decade ago
What is the difference between void pointer and NULL pointer?

Praveen kumar said:   1 decade ago
I dont know anybody give full explanation

Tasneem said:   1 decade ago
Can anybody explain it properly?

Yogeshwaran said:   1 decade ago
I don't know give any one for correct information.

Kalpana said:   1 decade ago
Since void pointer can return any type of pointer, in this problem it returns an integer pointer. Since 0 is null value of integer, the pointer return will be a null pointer.....

Niklesh Raut said:   1 decade ago
It is Null Pointer because, Pointer stores the addresses of another variable but when variable type is not known then it will be (void) and to store address it is consist(*) also,so (void *) and initially it points to 0th address, Means Null.

Amar said:   1 decade ago
it null pointer because pointer stores the addresses


Post your comments here:

Your comments will be displayed after verification.