1. Give the complete name each of the following gdb commands and write a complete sentence telling what each one does:
Hints (in random order): terminate, set breakpoint, single-step (two ways), show value, start execution, resume after breakpoint.
2. Explain the difference between the two selection operators, '.' (dot) and '->'.
3. Tell the difference between an inline function and a normal function.
4. Assume there is a header file named someclass.h that declares a class named SomeClass that has a constructor that takes an int as its argument, a function named setValue that takes an int as its argument, another function named getValue that takes no arguments, returns an int, and which can be used for const objects of the class. The class also has a private int data member. Write a program that defines objects of SomeClass with the following names and characteristics:
Write your program to do the following: When it starts executing, use getValue() to print the value of gc. Then assign the value 7 to dl and use getValue() to print that. Then call foo() two times and print the value it returns each time. Include the definition for foo(), which is to set the value of sl to one more than its previous value and to return the new value of sl. (Prototype for foo(): ' int foo(void); '
5. Declare a class that keeps track of how many objects of that class exist at any time. (It doesn't have to do anything else useful for this question.) Write definitions for the constructor, the destructor, and a member function that may be used to get the number of objects of the class. Just write the declarations for the relevant parts of this class, no function definitions.
6. What is "default memberwise copy," and how does is relate to overloading the '=' operator?
7. Write the code to declare the part of a class named Aclass that overrides the '+' operator.