home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18245 < prev    next >
Encoding:
Text File  |  1992-12-12  |  905 b   |  24 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!europa.asd.contel.com!emory!sol.ctr.columbia.edu!destroyer!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!shephard
  3. From: shephard@fraser.sfu.ca (Gordon Shephard)
  4. Subject: Re: ...so I typed this in straight from the book...
  5. Message-ID: <shephard.724148524@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. References: <1g108jINNdg8@terminator.rs.itd.umich.edu>
  9. Date: Sat, 12 Dec 1992 08:22:04 GMT
  10. Lines: 12
  11.  
  12. colinj@monet.ccs.itd.umich.edu (Colin Eric Johnson) writes:
  13.  
  14. >I typed this in straight in from the Kelly & Pohl book and it
  15. >dumps core every time I try to run it. Lint Hates it (says
  16. >main returns a random value).
  17.  
  18. >     char  c = 'a', *p, s[MAXSTRING];
  19. >     printf("%s %c%c%s\n", s, *s + 6, *s + 7, *s + 1);
  20.  
  21. "A Book on C: programming in C / AL Kelley, Ira Pohl - 2nd ed.
  22. Pg. 35
  23.       printf("%s  %c%c%s\n",s,*s+6,*s+7,s+1);
  24.