1.

Consider the following code segment:if (Y<0){X=-X;Y=-Y;}Z = 0; While (Y>0){Z=Z+X;Y=-1;}Assume that X,Y and Z are integer variables, and that X and Y have been initialized. which of the following best describes what this code segment does ?

A. Sets Z to be the sum X + Y
B. Sets Z to be the value of Y
C. Sets Z to be the absolute value of Y
D. Sets Z to be the product X*Y
Answer» E.


Discussion

No Comment Found