What is the difference between null pointer and the void
pointer?
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
NULL POINTER:
this pointer returns null value to the main function......
it cant be type casted.........
VOID POINTER:
this pointer has a special advantages that it can point
to any value (int , char, float etc) when its type casted
for eg:
main()
{
char *p;
int n;
(int *)p=&n;
so on the above character pointer is been type casted to
point an integer value n;
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / sunitha
null pointer : used to compair a pointer to any object or
a function and returns a null value to the main function.
void pointer : void pointer ia pointer which does not have
any return type and it can be easily type casted with other
type of pointers.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vaibhav
null pointer contain null value . it doesn't contain any
value.
while void pointer is a pointer that cascade at a runtime.
i.e it casting at runtime
Is This Answer Correct ? | 3 Yes | 3 No |
List some of the static data structures in C?
I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.
What does c value mean?
What is NULL pointer?
How to implement a packet in C
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
How do you use a 'Local Block'?
What is this pointer in c plus plus?
compute the nth mumber in the fibonacci sequence?
10 Answers Canon, HPL, Satyam, TCS,
what is difference between procedural language and functional language ?
int x=sizeof(!5.856); What will value of variable x?
Describe newline escape sequence with a sample program?