c++11 - Is it possible for a garbage value to be negative in an array in C++? -
consider:
int a[100]; is possible uninitialized value in a[i] (where 0 < < 100) negative?
yes, why wouldn't ? theses bits can , sign of integer msb (most significant bit). if bit 1, int considered negative.
i see little point of knowing though. can't rely on garbage data it's undefined behavior.
Comments
Post a Comment