C/ansi c

Advertisement


Question
what is difference between null pointer and void pointer

Answer
A pointer is a variable.
When you store the value NULL in a pointer, it is called a NULL pointer.

If the pointer's type is void, then it is a void pointer.

Example of NULL pointer:
int *num = NULL;
Here num is a NULL pointer.

Example of void pointer:
void *temp;
Here temp is a void pointer.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.