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...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:01 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 07:00 AM |
| Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 | rubywand@swbell.net | Tech FAQ | 0 | 04-04-2004 08:29 AM |