Thread: Null

  1. #1
    Join Date
    Apr 2015


    Hi ! , just last question about NULL pointer and I really appreciate your effort.

    what's still confusing me, is NULL pointer an constant address for every PC ? I mean we know that NULL pointer is 0x00000000000000 (depend 32bit or 64bit) , what I'm asking, is how will the PC know that this address "0x000000" is unique and not deferencing to any value? is that the management of the compiler to tell the PC that this address is NULL ?

    Or maybe who made the architecture of the PC define that at address 0x0000 can't be deferencing pointer?

    thanks alot and sorry for that question, but it's always plot up in my mind.

  2. #2
    Join Date
    Apr 2015
    I know that in the compiler there's macro called NULL, but how really PC knows that this value can't be deferenced and it's void? ! is it defined in the architecture of the PC that at address 0x00000 can't be any dereferencing?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Asked too many times already.
    Read your numerous other threads and stop being a help vampire.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. assign null value to a struct and check if it is null
    By ymc1g11 in forum C Programming
    Replies: 10
    Last Post: 11-01-2012, 03:58 PM
  2. NULL vs. 0
    By Aisthesis in forum C++ Programming
    Replies: 21
    Last Post: 12-20-2009, 11:53 PM
  3. Replies: 9
    Last Post: 10-20-2007, 01:05 AM
  4. null an int[]
    By Tommo in forum C Programming
    Replies: 4
    Last Post: 07-09-2007, 07:14 AM
  5. accept(ListenSocket, NULL, NULL); cause program to hang?
    By draggy in forum Networking/Device Communication
    Replies: 11
    Last Post: 06-16-2006, 03:40 PM

Tags for this Thread