Question: 1.Which is incorrect A. A pointer is a variable that holds the address of some other location in memory. B. Pointer variables are just memory

1.Which is incorrect

A. A pointer is a variable that holds the address of some other location in memory.

B. Pointer variables are just memory addresses and can be assigned to one another without regard to type

C. You can get a pointer value to initialize a pointer variable from an object of an appropriate type with the address-of operator, &.

D. When declaring several pointer variables, there must be one pointer declarator for each pointer variable.

2.Which is incorrect?

A.The keyword static is used in a static function declaration in a class but not in the function definition.

B. A class may have another class type object as a member.

C. A constructor can be called implicitly or explicitly. (Implicitly means the compiler did it for you.)

Example:

A x=A() ; // explicitly

A x(2) ; // implicitly

D. It is legal to call a constructor as a member function of an object of a class, as in

class A

{

public:

A(){}

A(int x, int y):xx(x), yy(y) {}

// other members

private:

int xx;

int yy;

};

int main()

{

A w;

w.A(2,3); // Is this legal?

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!