9

I am reviewing pointers and how to access the content of a memory location pointed by a pointer.

My question is: Are there any differences between indirection and dereferencing when they access the value of a pointer in C?

LED Fantom
  • 1,229
  • 1
  • 12
  • 32
  • 1
    It's better to use code to explain what you mean. – Yu Hao Mar 01 '15 at 03:05
  • Please read here what is dereferencing pointer mean [Read here ][1] [1]: http://stackoverflow.com/questions/4955198/what-does-dereferencing-a-pointer-mean – Shajibur Rahman Mar 01 '15 at 03:10
  • 4
    There probably is some nit-picky difference someone will quote, but basically they mean the same thing. – Hot Licks Mar 01 '15 at 03:25
  • 3
    “indirection” is a noun. “to dereference” is a verb, of which “dereferencing” is an inflection. They are used in different context because of English grammar, not because of a conceptual difference. – Pascal Cuoq Mar 01 '15 at 12:01
  • 1
    indirection is to dereferencing as transport is to driving – M.M Mar 01 '15 at 12:05

1 Answers1

11

I could find exactly one occurrence of "dereferencing" (and none of "dereference") in the current C11 draft, and this was in a footnote, in the phrase "dereferencing a pointer". The standard calls unary * the indirection operator.

I would find "indirecting a pointer" strange (the standard doesn't use the verb "to indirect"), but this question is more about linguistics than about programming. I'm not aware of any common usage of "dereferencing" meaning something else than indirection, and I doubt there is. This Wikipedia article calls unary * indirection as well as dereference.

mafso
  • 5,433
  • 2
  • 19
  • 40