exam review1 - #define. C) Enumereation constants have the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
10. Struct { float a; union { char b[4]; float c; int d; } e; char f[4]; }s; if char values occupy 1 byte, int values occupy 2 bytes, and float values occupy 4 bytes, how much space will a C compiler allocate for s? {Assume that the compiler leaves no “holes” between members.) 15. Which of the following statements about enumeration constants are true? A} An enumeration constant may represent any integer specified by the programmer B} Enumeration constants have exactly the same properties as constants created using
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #define. C) Enumereation constants have the values 0, 1, 2, by default. D) all constants in an enumeration must have different values. E) Enumeration constants may be used as integers in expressions. 16. Suppose that b and I are declared as follows: enum {FALSE, TRUE} b; int I; Which of the following statements are legal? Which ones are safe (always yield a meaningful result)? a) b = FALSE; b) b = I; c) b++; d) I= b; e) I = 2 * b+1;...
View Full Document

This note was uploaded on 04/26/2009 for the course EE 302 taught by Professor Mccann during the Fall '06 term at University of Texas at Austin.

Ask a homework question - tutors are online