Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: net.lang.c Subject: printf misconception Message-ID: <4166@alice.UUCP> Date: Sat, 17-Aug-85 10:34:49 EDT Article-I.D.: alice.4166 Posted: Sat Aug 17 10:34:49 1985 Date-Received: Tue, 20-Aug-85 05:25:47 EDT Organization: Bell Labs, Murray Hill Lines: 10 Jeff Anton says: > Not really, you are forgetting that the format "%.8s" will > cause printf to print up to a null or 8 chars max. Unfortunately > this style of printf can not be used with sizeof for compile time > format changes without run time code support. This is untrue. How about: printf ("%.*s", sizeof(thing), thing);