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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started