C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 1)
1.
What is (void*)0?
Discussion:
124 comments Page 11 of 13.
MN SWARNA said:
1 decade ago
The 'void' keyword is represent no value but null pointer \0 or 0.
So () denotes the value * denotes address of memory location,
so (void*)0 is represent the NULL POINTER.
So () denotes the value * denotes address of memory location,
so (void*)0 is represent the NULL POINTER.
Kanjit said:
1 decade ago
The (void *) I understand as meaning a pointer to a void, so
>
> (void *) 0
>
> would be a void pointer to zero
so it will be null pointer
>
> (void *) 0
>
> would be a void pointer to zero
so it will be null pointer
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.
Vinayak said:
1 decade ago
I think, since the representation of void with no parameter is (void).if we represent it in the form of (void*)0=>a pointer pointing to a location which is already been deallocated by using free() deallocation function.so it points to a location which has nothing i.e null.Hence it is rightly called as null pointer.
Ras said:
1 decade ago
I think it is void pointer but it is not void so explain it.
Bharathi said:
1 decade ago
Are you sure about this answer, sorry take it as negative I have bit doubt on this.
Prathi said:
1 decade ago
Here it s given that void(*)0. Is there any diff betwn void(*0) and void (*)0?.
Nishu said:
1 decade ago
void(*) measns void pointer,it means value is nt given or void..
but void(*0)means it point to null value(i.e 0)..therefore null pointer
but void(*0)means it point to null value(i.e 0)..therefore null pointer
Farz said:
1 decade ago
What for this '0' used?
Afsheen said:
1 decade ago
What is '0' representing here?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers