Q:

WHAT IS THE DIFFERENCE BETWEEN NULL POINTER AND UNINITIALIZED POINTER IN C?

belongs to collection: C INTERVIEW QUESTIONS AND ANSWERS

0

WHAT IS THE DIFFERENCE BETWEEN NULL POINTER AND UNINITIALIZED POINTER IN C?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Null pointer is a pointer which is pointing to nothing. Null pointer points to empty location in memory. Value of null pointer is 0. We can make a pointer to point to null as below.

int *p =  NULL;
char *p = NULL;

Uninitialized pointers are called as wild pointers in C which points to arbitrary (random) memory location. This wild pointer may lead a program to behave wrongly or to crash.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C INTERVIEW QUESTIONS AND ANSWERS

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
CAN ARRAY SIZE BE DECLARED AT RUN TIME?... >>
<< WHAT IS THE DIFFERENCE BETWEEN NULL AND ZERO?...