Yes, C is right in both cases.
Code:
memcmp would return ___________ for the call
memcmp("Hi, how are you?", "Hi, how are things?", 6);
(a) -1
(b) a negative number.
(c) zero.
(d) a positive number.
Code:
What is wrong with the following abstract class definition?
class Shape {
public:
virtual double print() const;
double area() const { return base * height;}
private:
float base;
float height;
}
(a) There are no pure virtual functions.
(b) There is a non-virtual function.
(c) Private variables are being accessed by a public function.
(d) Nothing.
I do other see people points-that's why I am trying to write the questions clearer and less ambigous. That's why I have all these pointer questions laying around.
Mr. C.