Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: fwrite(buf, 0, 42, stream) == ? Message-ID: <13094@smoke.BRL.MIL> Date: 13 Jun 90 04:12:00 GMT References: Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 8 In article flee@psuvax1.cs.psu.edu (Felix Lee) writes: >What is fwrite(buf, 0, 42, stream) supposed to return? I feel it >should return 42 when it successfully writes 42 objects of zero size, >but existing implementations seem to return 0. Strictly speaking, there are no semantics defined for such usage, because the "0" is supposed to be the size of some member of an array, and there are no 0-sized objects in C.