C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 1)
1.
What is (void*)0?
Discussion:
124 comments Page 2 of 13.
Kalpana said:
2 decades 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:
2 decades 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:
2 decades ago
it null pointer because pointer stores the addresses
Dinesh said:
2 decades ago
The Syntax for function definition is
return type function name(data type variable name)
but here the data type is given and the variable name is not given
and there is no return type.so,it is a null pointer.a void pointer is a pointer with return type void.
return type function name(data type variable name)
but here the data type is given and the variable name is not given
and there is no return type.so,it is a null pointer.a void pointer is a pointer with return type void.
Afsheen said:
2 decades ago
What is '0' representing here?
Farz said:
2 decades ago
What for this '0' used?
Nishu said:
2 decades 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
Prathi said:
2 decades ago
Here it s given that void(*)0. Is there any diff betwn void(*0) and void (*)0?.
Bharathi said:
2 decades ago
Are you sure about this answer, sorry take it as negative I have bit doubt on this.
Ras said:
1 decade ago
I think it is void pointer but it is not void so explain it.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers