Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!labrea!rutgers!att!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c Subject: Re: Use of " ? : " in format param to printf Keywords: printf Message-ID: <8801@alice.UUCP> Date: 19 Jan 89 22:05:25 GMT References: <1454@leah.Albany.Edu> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 12 In article <1454@leah.Albany.Edu>, rds95@leah.Albany.Edu (Robert Seals) writes: > printf(count == 0 ? " ---- " : " %4.0lf ", sum / count); > Does it matter if there are unused arguments to printf? It's OK to have unused arguments in printf, but they'll be evaluated whether they're used or not. Thus in this example if count is 0, the likely result is a divide by zero error. -- --Andrew Koenig ark@europa.att.com