
- Forum
- Programming Talk
- C and C++
- Dereferencing a NULL value
Dereferencing a NULL value
This is a discussion on Dereferencing a NULL value within the C and C++ forums, part of the Programming Talk category; Hi, What is the effect of dereferencing a pointer variable which has the value NULL? Charlie...
-
Dereferencing a NULL value
Hi, What is the effect of dereferencing a pointer variable which has the value NULL?
Charlie
-
First before answering to your question I will explain what is deferencing a pointer variable and this would clearly answer your question. Dereferencing a pointer variable reflects that the pointer is made to refer to some other location in memory. So as you have asked if you dereferencing a pointer variable which has the value NULL it would result in memory fragmentation/segmentation program.
-
Hi Rachelle,
First of all, thanks for responding tot he question. I am very new at this and have read your response several times. I feel like the caveman in the GEICO commercial where the specialist they ask the caveman for his response to a womans comments He said ......Huh?!
I think I get what youu are saying, but want to understand. Are you saying that the compiler will detect the error and issue an error message/ or will this make it through the compiler and you get a runtime error?
Charlie
-
Sponsored Ads

Reply With Quote





