Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.lang.c Subject: Re: Using sizeof() on a parameter array Message-ID: <1991May25.124405.20091@thunder.mcrcim.mcgill.edu> Date: 25 May 91 12:44:05 GMT References: <12151@jarthur.Claremont.EDU> Organization: McGill Research Centre for Intelligent Machines Lines: 20 In article , worley@compass.com (Dale Worley) writes: > struct dummy { char a[80]; }; > void test(struct dummy param) { > printf("sizeof(param) = %d\n", sizeof(param)); > } > will print 80 as expected! Or possibly more, if the compiler chooses to pad the structure :-) (For example, if every object is rounded up to a power of two, as I recall someone, ages ago, saying some twisted machine did....) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu