QUIZ 41

What value is returned by the function?

float func(){
int r = 0, d = 0, i=0;
for (i; i < 2; i++) {
r += 5 / d;
}
return r;
}

a. 0
b. Infinite Loop
c. Runtime Error
d. Syntax Error

Answer : (c)

Runtime Error : Divide by Zero

Leave a Reply

Your email address will not be published. Required fields are marked *