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:
123 comments Page 1 of 13.

Abhiram said:   1 month ago
It's a cast of 0 to (void *) '0' is a null value, so we got a NULL pointer.

void *ptr indicates void or generic pointer.

So (void *) is the address of pointer ptr.

Hossam Ahmed ALi said:   11 months ago
I think the right answer is B) Void pointer.

The void pointer can point to any variable of any data type or point to NULL which means points to no location in the memory.
(3)

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

And we also avoid parenthesis.
(3)

Swapnil Nimbalkar said:   2 years ago
Please explain it.
(3)

Mayur 22kar said:   3 years ago
A void pointer is a pointer which nothing points anywhere In memory.

A null pointer means a pointer pointing to zero. In computer language, null value its just like initialize with zero.
(11)

Gerry said:   6 years ago
Very informative. Thanks.
(1)

KHALIL Yhaia said:   6 years ago
It's a cast of 0 to (void *) '0' is a null value, so we got a NULL pointer.

Vidhi said:   6 years ago
void *ptr indicate void or generic pointer.

So (void *) is the address of pointer ptr.
(1)

Raj said:   7 years ago
(Void *)pointer is a pointer having no data type so it can't take implicitly data type we need to give data type explicitly.

Ie
(Void *)p

Need to give;
(int)*p
Or
(char) *p


(Void* ) have the flexibility to change the data type.

Udaykiran said:   7 years ago
I can't understand this. Please explain.


Post your comments here:

Your comments will be displayed after verification.