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:
122 comments Page 1 of 13.

Mayur 22kar said:   3 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.
(11)

Shubham patra said:   11 months ago
Because it is not pointing to any memory address therefore it's a null pointer.

And we also avoid parenthesis.
(3)

Swapnil Nimbalkar said:   1 year ago
Please explain it.
(2)

Hossam Ahmed ALi said:   7 months 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.
(2)

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

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

Gerry said:   6 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*).

Sree said:   1 decade ago
The void data type has no values.

Example:

int a=10; //right
void b=20;//wrong

pointer
a[address of 10]--------->10

pointer
b[address]---------> NULL (no value,no address so null)

So void is a representation of NULL.

Note: void *b; //right (no value, but we can store address)


Post your comments here:

Your comments will be displayed after verification.