/*
CS371p: Quiz #6 (5 pts)
*/
/* -----------------------------------------------------------------------
1. What is the difference between is-a and has-a abstraction?
[Sec. 2.2, Pg. 31]
(1 pt)
division into specialization vs. division into parts
*/
/* -----------------------------------------------------------------------
2. In terms of lvalue / rvalue, what is the left argument, right argument,
and return value of operator +=?
(1 pt)
lvalue, rvalue, lvalue
*/
/* -----------------------------------------------------------------------
3. What is the output of the following program?
(2 pts)
4
*/
#include <iostream> // cout, endl
using namespace std;
int main () {
int i = 2;
int* p = &i;
int** pp = &p;
int** qq = pp;
int* r = &++**qq;
++*r;
cout << i << endl;
return 0;}
syntax highlighted by Code2HTML, v. 0.9.1