Q:

What is the difference between an uninitialized pointer and a null pointer?

0

What is the difference between an uninitialized pointer and a null pointer?

All Answers

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

Answer:

An uninitialized pointer is a pointer that points unknown memory location. The behavior of the uninitialized pointer is undefined. If you try to dereference the uninitialized pointer code behavior will undefine.

According to C standard, an integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant. The behavior of the uninitialized pointer is defined. When you try to dereference the null pointer then your code will crash.

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

total answers (1)

Embedded C interview questions and answers (2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What are the causes of Interrupt Latency?... >>
<< Can we put a breakpoint inside ISR?...