Results from the quiz we did 1st class

Consider the following class (you may not change this header):

class Badger {

char* _storage;

public:

Badger();

Badger(const char*);

Badger(const Badger&);

~Badger();

void set(const char*);

void print() const;

int length() const;

};

The Answers are as follows in the image below that I have attached:

OOP344 Quiz Answers

 

In the image above, the code describes use of string library functions, along with copy constructors and deconstructors, as well as non-default constructors (a constructor which accepts a value and sets it at the start of run time) (rather than simply going into the default constructor)

Leave a comment