Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 alist;

list::iterator iter;

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::iterator strIterA, strIterB;

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago

Question

5. What information would the team members need?

Answered: 1 week ago

Question

Where those not participating, encouraged to participate?

Answered: 1 week ago