Given the following code segment, what are the values of var1 & var2 after the loop finishes?
A. var1=3, var2=-1
B. var1=0, var2=2
C. var1=1, var2=1
D. var1=2, var2=0
Answer:C
Given the following code segment, what are the values of var1 & var2 after the loop finishes?
A. var1=3, var2=-1 B. var1=0, var2=2 C. var1=1, var2=1 D. var1=2, var2=0