Question
C++ Questions What is the output of the following pseudocode code: ages = new List Append(ages, 55) Append(ages, 88) Append(ages, 66) Print(ages) A. 55, 66,
C++ Questions
What is the output of the following pseudocode code:
ages = new List
Append(ages, 55)
Append(ages, 88)
Append(ages, 66)
Print(ages)
A. | 55, 66, 88 | |
B. | 55, 88, 66 | |
C. | 55, because there is no loop | |
D. | 66, because there is no loop | |
E. | None of the above. |
QUESTION 2
Type the list after the given operations. Each question starts with an empty list. Type the list as: 5, 7, 9
Append(list, 3) Append(list, 2) Append(list, 1) Remove(list, 3)
A. | 3, 2 | |
B. | 2, 1 | |
C. | 1, 2 | |
D. | 2, 3 | |
E. | None of the above. |
QUESTION 3
Assume 11 element list alist contains the characters in the string "mathematics". What is the sequence of elements after executing the instructions?
list
list
iter = alist.begin();
iter++;
alist.erase(iter++);
iter++;
alist.erase(iter);
alist.pop_front();
A. | m a t h e m a t | |
B. | a t h e m a t i | |
C. | m t e a t i c s | |
D. | t e m a t i c s | |
E. | None of the above. |
QUESTION 4
Given a list with nodes 'Z', 'A', 'B', Sort(list) yields 'A', 'B', 'Z'.
A. | True | |
B. | False | |
C. | Lists can not be sorted | |
D. | Not enough information whether it is ascending or descending. | |
E. | None of the above. |
QUESTION 5
Assume the declaration:
string weekName[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
const int DAYSINWEEK = 7;
list
After executing the following instructions, strIterA is the location of day _______.
strIterA = weekList.end();
strIterA--;
strIterA--;
A. | Mon
| |
B. | Wed | |
C. | Fri | |
D. | Tues | |
E. | None of the above. |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started