1. |
What is (void*)0? |
|||||||
Answer: Option A Explanation: 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. The main difference between NULL pointer and Void pointer is, Null pointer doesn't represent any memory location.Its value is 0. But void pointer can represents to memory location of its own type. In the example (Void*)0(zero). it means a pointer type void represents to the location of zero.so its NULL(as mentioned 0 in the example) so syntax for the NULL pointer can be used as (Void*)0 This is the definition for VOID pointer. we can assign this to any data type. Example: #include |
Post your comments here:
Name *:
Email : (optional)
Your comments will be displayed only after manual approval.