Unformatted text preview:

CSE 2341 Exam1 Fall 08 Pointer problems 2 points each Assume the following declarations and answer the questions below int array 6 3 9 12 13 int ptr char str C is such fun ptr array 1 1 What will display when the following code is executed for int I 0 I 3 i ptr cout ptr 2 What will display when the following code is executed cout str 3 What will display when the following code is executed cout str 4 4 What will display when the following code is executed cout ptr 2 5 What is the pointer equivalent to the following array notation array 4 In your textbook we studied a List class implemented as an array and then as a linked list In the tasks below state whether you would use an array or linked list and why Complete coding exercise 20 points Write the interface and implementation of a class that has the following properties a The name of the class is secretType b The class secretType has four instance data members pointer to a character representing the type name integers age and weight double height c The class has the following member functions Constructor that initializes the data members to the values passed in as parameters Copy constructor Set and get functions for name age weight and height Destructor to release any dynamically allocated memory


View Full Document

SMU CSE 2341 - Study Guide

Loading Unlocking...
Login

Join to view Study Guide and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Guide and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?