Hw2 - e) Show how to dynamically (with new) allocate an...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework Assignment #2 CS 163: Data Structures Spring 2010 Answer the following questions: a) Create an array of 50 characters, dynamically at run time using new b) Show what a node would look like if it had a dynamically allocated array of characters in it. c) Create an array of 50 videos (assume video is a struct or class that you already have), dynamically at run time using new d) Show what a node would look like if it had a dynamically allocated array of videos in it.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e) Show how to dynamically (with new) allocate an array of 50 nodes f) Show how to dynamically (with new) allocate an array of 50 node pointers (i.e., 50 head pointers) a. Assuming that other nodes have been addedWrite an iterative function to insert a node at the end of the last linked list g) Write the code to show how you would deallocate all dynamic memory for an array of linear linked lists. Dont forget to deallocate all of the LLL and the array afterwards....
View Full Document

This note was uploaded on 10/16/2011 for the course CS 163 taught by Professor Fant during the Spring '09 term at Portland State.

Ask a homework question - tutors are online