C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 1)
1.
What is (void*)0?
Discussion:
124 comments Page 4 of 13.
Jiten said:
1 decade ago
I think void is the correct answer because void means no return type, but we know pointer should indicates address of the data type, but no return datatype are here. So (void*) indicates the NULL pointer.
Bandita said:
1 decade ago
Thnaks Nikhilesh.
Srr said:
1 decade ago
Void means no return type and * means finding the address of return type. So that is represented as null pointer.
Rajkumar said:
1 decade ago
Thanks Jeho.
Sandeep said:
1 decade ago
:ITS IS A ERROR BECAUSE * DOES NOT COMES BEFORE VOID
VOID DOES NOT RETURS ANY VALUE
VOID DOES NOT RETURS ANY VALUE
Yeswanth said:
1 decade ago
The keyword - void - itself represents that it is null and * indicates pointer so simply it indicates null pointer.
And void* represents that a pointer having no values.
For eg. in sets void={} -it represents null set na. Like that...
And void* represents that a pointer having no values.
For eg. in sets void={} -it represents null set na. Like that...
Partha said:
1 decade ago
Void pointer is a pointer that can point to any type of data. Null pointer is a pointer that shows that the pointer doesnt point to any valid data.
According to me this is both a void and a null pointer.
According to me this is both a void and a null pointer.
Kishor said:
1 decade ago
Ii is void pointer if the declaration is void *
But in the e.g. it is given (void *)0 Hence it is null pointer.
But in the e.g. it is given (void *)0 Hence it is null pointer.
Amol said:
1 decade ago
(void *) is nothing but generic pointer. We can convert it into any other type of pointer Eg. int pointer, float pointer, by type casting it ie we can convert void pointer into int as int(void *). This generic pointer point to memory location.
Pruthvi said:
1 decade ago
Can any one explain me what is the use of void/null pointer then??
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers