was hoping someone with more experience could look over and tell me if these answers look alright.
in red is what i got

-- srand:
a. Should be called before each call to rand.
b. Should be used instead of rand to generate truly random numbers.
c. Is unnecessary in C++.
d. Can use the time function’s return value as an optimal seed value.

--Enumeration constants:
a. Must have unique integer values.
b. Can be assigned other values once they have been defined.
c. Must have unique identifiers.
d. Are declared using the keyword const.

--Which of the following is not a valid enumeration statement?
a. Enum person { me, you, them };.
b. Enum person { me = 1, you = 2, them = 3 };.
c. Enum person { me = 0, you = 0, them = 0 };.
d. Enum person { me, you, me };.

( for this one kinda guest, my logic was that they cannot be all the same or game would be infinite as will always be same)



7 Years
Discussion Span
Last Post by Galf

You're just asking someone to do your homework. You can find the answer to the first question by running a google search for srand. Since this is for a C++ class, I can only assume you are able to compile C++ code, which would let you verify the answers for #2 and #3.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.