Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > order of array ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 10 Topic 4079 of 4218
Post > Topic >>

order of array subscripts

by noway@[EMAIL PROTECTED] Mar 25, 2008 at 07:45 AM

#include <stdio.h>

char uu[5][4];

main()
{
printf("%p %p %p\n",&uu[0][0],&uu[1][0],&uu[0][1]);
}

gives

C:\a>kwik
0040C1F0 0040C1F4 0040C1F1


This suggests the rightmost array subscript iterates most quickly, so
uu is an array of 5 of array of 4 of char.

Is that understanding correct? Sorry for such a trivial question but I
think my understanding hitherto has been wrong.
 




 10 Posts in Topic:
order of array subscripts
noway@[EMAIL PROTECTED]   2008-03-25 07:45:00 
Re: order of array subscripts
"Alf P. Steinbach&qu  2008-03-25 09:06:37 
Re: order of array subscripts
Keith Thompson <kst-u@  2008-03-25 09:00:23 
Re: order of array subscripts
vippstar@[EMAIL PROTECTED  2008-03-25 11:49:21 
Re: order of array subscripts
Andrey Tarasevich <and  2008-03-25 12:03:26 
Re: order of array subscripts
Eric Sosman <Eric.Sosm  2008-03-25 15:55:08 
Re: order of array subscripts
"Jim Langston"   2008-03-25 23:59:28 
Re: order of array subscripts
Keith Thompson <kst-u@  2008-03-26 00:43:57 
Re: order of array subscripts
Flash Gordon <spam@[EM  2008-03-26 07:38:23 
Re: order of array subscripts
pete <pfiland@[EMAIL P  2008-03-29 00:10:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 0:10:20 CDT 2008.