Thread: arrays, addresses and confusion...!

  1. #1
    Registered User
    Join Date
    Feb 2003

    arrays, addresses and confusion...!

    I have a simple q... I am a simple man...
    Sometimes I see a character array passed to a function that takes a pointer by just using the name of the array when the function call is made, the array name is passed. I understand this, because the array name is the a pointer to the address of the first element. Now, how can people use the array name in pointer arithmetic? I really just want to know what actual value it would hold.
    I suspected it would be the size of whatever objects where in the array. Thanks to anyone who will help a simple man!
    "It compiled, let's ship it!"

    Guitar Australia
    my site for some easy tutorials.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed