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 > Re: order of ar...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 10 Topic 4079 of 4306
Post > Topic >>

Re: order of array subscripts

by "Alf P. Steinbach" <alfps@[EMAIL PROTECTED] > Mar 25, 2008 at 09:06 AM

* noway@[EMAIL PROTECTED]
> #include <stdio.h>
> 
> char uu[5][4];
> 
> main()

Needs to have result type 'int'.


> {
> 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?

Yep.


> Sorry for such a trivial question but I
> think my understanding hitherto has been wrong.

T'is OK.


Cheers, & hth.,

- Alf

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 




 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 Wed Oct 15 12:14:44 CDT 2008.