1.

Assume that the Point class is existing with the following snippet in the header file Point.h: class Point { Point(); Pont(int, int); int GetX(); int GetY(); void SetX(int); void SetY(int); }; If the objects of Point are created as Point oPointOne, oPointTwo(2,3); Which of the following statements are correct? (i)The statement oPointOne.SetX(20); Will compile and run successfully. (ii) The statement oPointOne.SetX(20).SetY(30); Will compile successfully but will give a run time error.

A. Only (i) is correct
B. Both (i) and (ii) are correct
C. Both (i) and (ii) are incorrect
D. Only (ii) is correct
Answer» B. Both (i) and (ii) are correct


Discussion

No Comment Found

Related MCQs