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

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)

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*).

Abhishek Anand said:   2 decades ago
Can Anybody, explain this Please

Paste said:   2 decades ago
Please explain.


Post your comments here:

Your comments will be displayed after verification.