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

Anubhuti said:   1 decade ago
It is a null pointer.

If you try this float *a = (void*)0;

printf("%u \n", a);

You will see value of a;

Sandeep rao said:   1 decade ago
It is pointer which return nothing or null. It is use in those function which simply print something.

Aman said:   7 months ago
(void*) converts the integer 0 into a void* pointer type.

The result is a null pointer of type void*

Sandeep said:   1 decade ago
:ITS IS A ERROR BECAUSE * DOES NOT COMES BEFORE VOID
VOID DOES NOT RETURS ANY VALUE

Santhu84 said:   1 decade ago
#ifndef NULL
# define NULL ((void *) 0)
#endif

Then you can use NULL in different functions.

Yogesh said:   10 years ago
Initially *ptr pointing to arr [1]. So that reason above answer is correct as per my knowledge.

Lohith said:   1 decade ago
void it self states empty or 0.
i.e mean nothing.
For void no memory location is allocated.

Neha said:   1 decade ago
It seems type casting, as its for pointer address following it is 0, so it is null pointer.

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

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

Dushyant said:   9 years ago
Void is no return type. If I write (void*) something then print the void value=null.


Post your comments here:

Your comments will be displayed after verification.