C++ Assume the declaration string weekName[] = {\"Sun\", \"Mon\", \"Tue\", \"Wed
ID: 3783881 • Letter: C
Question
C++
Assume the declaration
string weekName[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
const int DAYSINWEEK = 7;
list<string>::iterator strIterA, strIterB;
After executing the following instructions, strIterA is the location of day _______.
strIterA = weekList.begin();
strIterB = weekList.end();
strIterB--;
while(strIterA != strIterB)
{
strIterA++;
strIterB--;
}
Mon
Wed
Fri
Tues
None of the above.
A.Mon
B.Wed
C.Fri
D.Tues
E.None of the above.
Explanation / Answer
Answer would be option E. None of the above.
Assumption : weekList list is not defined in this program. if it is typo error then weekName is array of string and begin and end member function doesn't work on array. they work on list of string.
Thanks,
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.