home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18703 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.2 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!mcsun!sunic!dkuug!diku!cthulhu
  2. From: cthulhu@diku.dk (Stefan Krabbe)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <1992Dec20.134537.29673@odin.diku.dk>
  6. Date: 20 Dec 92 13:45:37 GMT
  7. References: <Bz0A46.Cvu@watserv1.uwaterloo.ca> <1992Dec12.111409.147@ondec.lonestar.org> <1992Dec16.231449.22903@cs.uow.edu.au> <rfries.150@sceng.ub.com>
  8. Sender: cthulhu@embla.diku.dk
  9. Organization: Department of Computer Science, U of Copenhagen
  10. Lines: 22
  11.  
  12. rfries@sceng.ub.com (Robert Fries) writes:
  13.  
  14. > > >  "this is a test"[4]
  15. > > I give up. What is it?
  16. > The value is ' '. 
  17. > An even more bizarre way of writing it is:
  18. >     4["this is a test"]
  19.  
  20. >Yes, it works, and yes, this is another example of the useless things
  21. >you can learn by reading news articles.
  22.  
  23. Hmm. I don't think it's useless. It also follows logically from this:
  24.  
  25.         ptr[i] == *(ptr + i) == *(i + ptr) == i[ptr]
  26.  
  27.              Kind Regards
  28.                 Stefan
  29. -- 
  30.                                      ___
  31.   Name:  Stefan Krabbe       .......(o o).......
  32.   Email: cthulhu@diku.dk     ---vvv---U---vvv---
  33.   Institute of Computer Science, University of Copenhagen.
  34.