Thread: what are the different between a+i and *(a+i)?in a[n][n]

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    1

    what are the different between a+i and *(a+i)?in a[n][n]

    when I define a array for example a[n][n],
    what are the different between a+i and *(a+i)?
    they are all adress.
    thank you(I'm a foreigner ,english is bad ^_^)

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    a+i is an address of the (i+1)th array stored in a

    *(a+i) dereferences the first element in the (i+1)th array. It is not an address unless the arrays are storing addresses.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed
Website Security Test