问题 Edit: What about if we had this char value_arr[8]; // value_arr is set to some value snprintf(value_arr, 8, "%d", *value_arr); is this behavior defined? Let's say for some ungainly reason I have char value_arr[8]; // value_arr is set to some value int* value_i = reinterpret_cast<int*>(value_arr); snprintf(value_arr, 8, "%d", *value_i); // the behaviour in question Is there a guarantee that, for example, if *value_i = 7, then value_arr will take on the value of "7". Is this behavior defined?