home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / vmsnet / internal / 1415 < prev    next >
Encoding:
Internet Message Format  |  1992-10-08  |  1.3 KB

  1. Path: sparky!uunet!cs.utexas.edu!usc!wupost!sdd.hp.com!network.ucsd.edu!mvb.saic.com!macro32
  2. From: SYSMGR@IPG.PH.KCL.AC.UK
  3. Newsgroups: vmsnet.internals
  4. Subject: C Language question
  5. Message-ID: <23000B53_00073190.00961C83B1DAD300$668_1@UK.AC.KCL.PH.IPG>
  6. Date: Thu,  8 OCT 92 11:17:27 BST
  7. Organization: Macro32<==>Vmsnet.Internals Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 21
  10.  
  11. (To those who get offended by questions that stray outside a group's main
  12. intention - Sorry, please hit delete now. I'm not sure what the appropriate
  13. mail list is, and I do know that the folks that follow this one are likely
  14. to know!)
  15.  
  16. Question: in C, if one declares char a[I][J], is there anything in the
  17. language standard that guarantees that &a[0][0] is the first of a set of
  18. I*J contiguous chars, and that a[i+1][0] is guaranteed to be the same
  19. storage location as a[i][J] ).
  20.  
  21. A friend asserts that it is, and says his experience on several systems
  22. 'proves' this. My belief is that there is nothing that says this will
  23. always be the case, and that the only constraint is that every valid pointer
  24. a[i] will point to J chars. Which of us is right?
  25.  
  26.         Yours,
  27.                 Nigel Arnot
  28.  
  29.                 NRA%ipg.ph.kcl.ac.uk@nsfnet-relay.ac.uk   (internet)
  30.                 NRA%uk.ac.kcl.ph.ipg@ukacrl.bitnet        (bitnet)
  31.  
  32.