C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 1)
1.
What is (void*)0?
Discussion:
124 comments Page 1 of 13.
Mayur 22kar said:
4 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.
A null pointer means a pointer pointing to zero. In computer language, null value its just like initialize with zero.
(11)
Hossam Ahmed ALi said:
2 years 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.
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.
(4)
Swapnil Nimbalkar said:
2 years ago
Please explain it.
(3)
Shubham patra said:
2 years ago
Because it is not pointing to any memory address therefore it's a null pointer.
And we also avoid parenthesis.
And we also avoid parenthesis.
(3)
Abhiram said:
10 months 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.
void *ptr indicates void or generic pointer.
So (void *) is the address of pointer ptr.
(2)
Vidhi said:
7 years ago
void *ptr indicate void or generic pointer.
So (void *) is the address of pointer ptr.
So (void *) is the address of pointer ptr.
(1)
Gerry said:
7 years ago
Very informative. Thanks.
(1)
Paste said:
1 decade ago
Please explain.
Abhishek Anand said:
1 decade ago
Can Anybody, explain this Please
JEHO said:
1 decade ago
Void is used in 2 places.
1st void function_name (void).
1st void indicate functio type is null.
Eg int main, char main.
2nd (void) indicate no parameters in function.
3rd function of void is NULL POINTER.
NULL POINTER SYNTAX IS (VOID*).
1st void function_name (void).
1st void indicate functio type is null.
Eg int main, char main.
2nd (void) indicate no parameters in function.
3rd function of void is NULL POINTER.
NULL POINTER SYNTAX IS (VOID*).
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers