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

5.Given the declaration enum myCatsNames {bigOrange, birthday, bugEyes, casper,

ID: 3539399 • Letter: 5

Question

5.Given the declaration

          enum myCatsNames {bigOrange, birthday, bugEyes, casper,
                                              chava, cinderella, fluffy, fubar, goldie,
                                              lambChop, pepsi, popeye};

which of the following function headers would be appropriate for a function used to write the name of one of my cats? Answer

A. void printIt (int what) B. void function printIt (int what) C. void counter::printIt (int what) D. counter:: void printIt (int what) E. void public printIt (int what) 2.The following if statement ____________.

     if (13 < 12)
          cout << "Never";
     else
          cout << "Always"; A. writes the word Never B. writes the word Always C. won't compile since 13 is not less than 12 D. causes a runtime error since 13 is not less than 12 E. prints nothing since 13 is not less than 12 3. In designing a class, we should carefully consider the required data members and ____________. Answer A. functions B. procedures C. attributes D. methods E. definitions 4. The standard output stream is named ____________. Answer A. cout B. output C. extern D. display E. put

5.Given the declaration

          enum myCatsNames {bigOrange, birthday, bugEyes, casper,
                                              chava, cinderella, fluffy, fubar, goldie,
                                              lambChop, pepsi, popeye};

which of the following function headers would be appropriate for a function used to write the name of one of my cats? Answer

A. void writeName (myCatsNames name) B. void writeName (name myCatsNames) C. void writeName (myCatsNames, "Pepsi") D. void writeName (name, "Casper") E. Cannot be done.

Explanation / Answer

void counter::printIt (int what)

writes the word Always

functions


void writeName (myCatsNames name)

cout
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