home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!dw3u+
- From: dw3u+@andrew.cmu.edu (Daniel C. Wang)
- Newsgroups: comp.lang.c
- Subject: Re: Question to test general C knowledge
- Message-ID: <8f_bGuK00aw3At0FV2@andrew.cmu.edu>
- Date: 12 Dec 92 13:24:42 GMT
- Article-I.D.: andrew.8f_bGuK00aw3At0FV2
- References: <Bz0A46.Cvu@watserv1.uwaterloo.ca>
- <1992Dec11.214128.1136@nb.rockwell.com>
- Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
- Lines: 19
- In-Reply-To: <1992Dec11.214128.1136@nb.rockwell.com>
-
-
- wade@nb.rockwell.com (Wade Guthrie) writes:
- > One question that I particularly like, although few applicants ever get it, is:
- >
- > what does:
- >
- > printf("shop"+1);
- >
- > do?
- >
- > Wade
- > wade@nb.rockwell.com
-
- hop
-
- "shop"+1 is the address of the string constant "shop" plus one. So
- printf gets "hop";
-
- Am I hired? :)
-