undefined behaviour means the compiler can emit any code it likes. Your program might show results that you expect or it might format your harddrive or it can start sending emails to the taliban. anything can happen
Related Contents:
- Explaination for printf with comparing variables as arguments
- Why are these constructs using pre and post-increment undefined behavior?
- (Why) is using an uninitialized variable undefined behavior?
- Can we change the value of an object defined with const through pointers?
- Is the “struct hack” technically undefined behavior?
- Is a^a or a-a undefined behaviour if a is not initialized?
- Is accessing a global array outside its bound undefined behavior?
- How undefined is undefined behavior?
- Is the behaviour of casting a negative double to unsigned int defined in the C standard? Different behaviour on ARM vs. x86
- A question about union in C – store as one type and read as another – is it implementation defined?
- How to implement memmove in standard C without an intermediate copy?
- Why does char* cause undefined behaviour while char[] doesn’t?
- When is casting between pointer types not undefined behavior in C?
- Is the output of printf (“%d %d”, c++, c); also undefined?
- In C99, is f()+g() undefined or merely unspecified?
- Is this undefined C behaviour?
- Why does this implementation of strlen() work?
- Unspecified, undefined and implementation defined behavior WIKI for C
- C – function returning a pointer to a local variable
- Sequence points and side effects in C
- Is while(1); undefined behavior in C?
- Do I cast the result of malloc?
- How can one print a size_t variable portably using the printf family?
- Implicit function declarations in C
- How can I use an array of function pointers?
- Enabling VLAs (variable length arrays) in MS Visual C++?
- Unit Testing C Code [closed]
- Why does “++x || ++y && ++z” calculate “++x” first, even though operator “&&” has higher precedence than “||”
- What does the C standard say about bitshifting more bits than the width of type?
- How to prevent gcc optimizing some statements in C?
- Maximum memory which malloc can allocate
- Array to pointer decay and passing multidimensional arrays to functions
- Meaning of “referencing” and “dereferencing” in C
- Why a pointer + 1 add 4 actually
- What is the point of header files in C? [duplicate]
- How do you do non-blocking console I/O on Linux in C?
- Why does this implementation of offsetof() work?
- How to list physical disks?
- Why can’t I create an array with size determined by a global variable?
- How to use realloc in a function in C
- Initializing a struct to 0
- What’s a modern term for “array/pointer equivalence”?
- Fastest way to multiply an array of int64_t?
- integer size in c depends on what?
- Does Function pointer make the program slow?
- how to check for the “backspace” character in C
- Is relational comparison between int and float directly possible in C?
- Flexible array member not getting copied when I make a shallow copy of a struct
- What is the difference between %f and %lf in C?
- how to bind raw socket to specific interface