Lindsey Kuper (lindseykuper) wrote,
Lindsey Kuper

Lindsey's concise guide to pointer types in C

Between work and class, I'm finally starting to get my C legs.1 For your edification, then, I present here a useful guide:

pointer to int
Haha. Ahahahahahah. Heh. *snort* Oh man. Okay. By "pointer to int", we mean "variable containing an address containing something that has type int"., wait, that's not it either. That's just what we want you to think. What we actually mean is "variable containing an address whose contents could be anything at all, but which we currently plan on interpreting as an int, not to say that we don't fully intend to change our minds in the future, possibly several times, and not to say that said contents themselves won't change, possibly several times."
pointer to char
See "pointer to int", mutatis mutandis.
pointer to long
See above.
pointer to void
Um...anything whatsoever. Seriously, this is just whatever the hell you want it to be.2

The rest is basically the same, so I'll just stop there. Enjoy!

  1. Ba-dum-ch!
  2. Come on! I mean, why have a type system at all? What is wrong with you people?
Tags: programming

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded