In C is there any guarantee with code prior to undefined behavior?
问题 In the following code is is guaranteed that "0\n" be printed? #include <stdio.h> int main(void) { int c = 0; printf("%d\n",c); printf("%d,%d\n",++c,++c); } More generally, if a program has undefined behavior does the entire program become undefined or only from the sequence point that begins the problematic code? Please note: I am not asking about what the compiler does with the second printf. I am asking if the first printf is guaranteed to occur. I know that undefined behavior is capable of