Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Exam Preparation Exercises True or false? 1. All of the integral types in C++ ca

ID: 655446 • Letter: E

Question

Exam Preparation Exercises True or false? 1. All of the integral types in C++ can be signed or unsigned. machine's int type is 32 2. The size of operator can be used to determine whether a 64 bits long. True or false? equal. True or false? 3. ting-point numbers are seldom exactly letters. True or 4. The values of enumerator types must be written in uppercase 5. What are the five integral types in C++? type declarations? 6. What is wrong with the following pair of enumeration enum Colors (RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET) enum Flowers(ROSE, DAFFODIL LILY VIOLET, COSMOS ORCHID); 7. Given the declaration of colors in Exercise 6, what is the value of the expression oE LOW 1) 8. Given the code segment: enum Flowers (ROSE, DAFF0DIL, LILY VIOLET COSMOS ORCHID) Flowers choice; choice LILY choice Why does the compiler give an invalid type error message for the last line? 9. Why is it impossible to use an anonymous type with a function parameter? 10. A struct cannot have another struct as a member. True or false? false 11. A union is a struct that can hold just one of its members at a time. True or 12. Given the following declarations: struct Name string first; string middle; string last;

Explanation / Answer

Answer 6: same parameter declaration in the second enum list with same memory block(Unexpected reserved word too) .

Answer 7: enum Color {RED = 1, ORANGE = 2, YELLOW = 3, GREEN = 4, BLUE = 5, INDIGO = 6, VIOLET = 7};

the value of yellow+1=4;

Answer 8: enum didn't conatin the data memory address thatswhy the compiler give an invalid type message for the last line .

answer 12: 24 bit .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote