Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. A class constructor is implicitly invoked when a classobject is declared. A.

ID: 3612130 • Letter: 1

Question

1. A class constructor is implicitly invoked when a classobject is declared.
A. True B. False

2. When an attribute or method is declared to be private, itcan only be accessed by the methods of that class.
A. True B. False

3. Given the following declaration, which of the statementsgiven in the options is not a valid C++ statement. int x(5),y(7), *ptr(&x), *ptr2(&y);
A. ptr = ptr2;
B. &ptr2 = ptr1;
C. *ptr = 15;
D. x = *ptr2;

4. The address of an object is the same from one execution tothe next execution
A. True
B. False

5. A pointer is a variable which holds the address as itsvalue
A. True
B. False

6. An array variable can be passed to a pointerparameter.
A. True
B. False

7. The declaration const char *c_ptr = "try this"; means thatthe value of c+ptr can not be changed in other words c_ptr can notpoint to some other string.
A. True
B. False

Thank you

Explanation / Answer

1.A 2.B 3.B 4.A 5.A 6.A 7.A