Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!mit-eddie!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!unido!sbsvax!greim From: greim@sbsvax.UUCP (Michael Greim) Newsgroups: comp.lang.c Subject: What should "sizeof (expression)" return? Why "8" ?? Keywords: sizeof expression Message-ID: <654@sbsvax.UUCP> Date: 6 Dec 88 15:44:46 GMT Organization: Universitaet des Saarlandes, Saarbruecken, West Germany Lines: 44 Hello, Just recently I tried the following program: ---- cut ---- # includestruct misty { unsigned int a1:1; unsigned int a2:15; }; struct misty mist; char c1, c2; int i; float r; char s [20]; main () { printf ("sizeof(mist.a1) [1 bit] = %d\n", sizeof(mist.a1)); printf ("sizeof(c1