C++ 5 question

timer Asked: Nov 12th, 2016

Question description

Question 1: (1 pt)

What are the similarities and differences between pointers and iterators when dealing with linked lists?

Question 2: (1 pt)

What are the benefits behind using smart pointers and can they be used with linked lists? Justify.

Question 3: (1 pt)

How can you implement Queue class using LinkedList class using composition vs using inheritance?

Question 4: (1 pt)

Which problem solving approach is better: recursive solutions or iterative ones? Justify.

Question 5: (1 pt)

If there are multiple catch blocks for one try block and in each block the exception objects correspond to a base class and its corresponding derived class. Which catch block should appear first: the one for the base class or for the derived class? Justify.

Tutor Answer

(Top Tutor) Studypool Tutor
School: UC Berkeley
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors