Exercises
-
19.6 (Concatenating Lists) Write a program that concatenates two linked list objects of characters. The program should include function
concatenate
, which takes references to both list objects as arguments and concatenates the second list to the first list. -
19.7 (Merging Ordered Lists) Write a program that merges two ordered list objects of integers into a single ordered list object of integers. Function
merge
should receive references to each of the list objects to be merged and a reference to a list object into which the merged elements will be placed. -
19.8 (Summing and Averaging Elements in a List) Write a program that inserts 25 random integers from 0 to 100 in order in a linked list object. The program should calculate ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.