arrays, addresses and confusion...!

This is a discussion on arrays, addresses and confusion...! within the C Programming forums, part of the General Programming Boards category; I have a simple q... I am a simple man... Sometimes I see a character array passed to a function ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    60

    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
    Posts
    5,006
    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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21