Re:Infinite loop in C
by drivers99 on Thursday June 13, 2013 @11:17AM
(#5874487)
"int" is signed unless you specify "unsigned". So "static int" would be a signed int that is also static.
Also, I see no reason why it would crash. Once it gets to the max value, incrementing would return some other value but I've never seen C produce a runtime error for an integer overflow.
Also, I see no reason why it would crash. Once it gets to the max value, incrementing would return some other value but I've never seen C produce a runtime error for an integer overflow.