{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern