Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!ra!it1 From: it1@ra.MsState.Edu (Tim Tsai) Newsgroups: comp.lang.c Subject: question about an array of enum Message-ID: Date: 3 Nov 90 08:53:50 GMT Distribution: comp Lines: 28 consider the following code: typedef enum {false, true} boolean; main() { boolean bit_fields[1000]; bit_fields[0] = true; } How much memory does bit_fields actually take up, assuming a 32-bit architecture? Will my C compiler treat it as an array of int's? (Sun OS 4.1, Sun cc). What about other C compilers? (I know turbo C has a switch that allows it to treat enum data types as int's). I thought about using an array of characters and calculate the positions, but I'd rather use enum if possible. It's quite a bit simpler. Any help is greatly appreciated... -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. Disclaimer: I don't speak for ANYBODY but myself!