We were having a quiz of sorts and had the following question where we had to find the error, or if there's none, the output of the given code:
#include <stdio.h>
int main(void) {
int n = 012;
b: printf("%d
",n--);
if(n!=0){
n--;
goto b;
}
return 0;
}
I don't see anything wrong with this in theory but this leads to an infinite loop with the variable going way below 0. Could anyone help me with this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…