What is the difference between null pointer and the void
pointer?

Answers were Sorted based on User's Feedback



What is the difference between null pointer and the void pointer?..

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

What is the difference between null pointer and the void pointer?..

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

What is the difference between null pointer and the void pointer?..

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

Post New Answer

More C Interview Questions

what is the hexidecimal number of 4100?

16 Answers   Google,


What does nil mean in c?

0 Answers  


What is the difference between static and global variables?

1 Answers  


Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.

1 Answers  


What are the valid places to have keyword “break”?

0 Answers  






How can I change their mode to binary?

0 Answers  


What is the significance of scope resolution operator?

0 Answers   Agilent, ZS Associates,


Explain what are the standard predefined macros?

0 Answers  


how to introdu5ce my self in serco

0 Answers  


Write a program that his output * *** *****

1 Answers  


What is bubble sort in c?

0 Answers  


What is the Difference between Class and Struct?

10 Answers   Motorola,


Categories