Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for chris-barryâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Is it undefined behaviour to just make a pointer point outside boundaries of an array without dereferencing it? When a compiler encounters the statements ``` char arr[10]; char ptr = &arr[-1] ``` there are three things that it could reasonably do: 1. It can raise an error. 2. It can compile the statements and raise a warning. 3. It can compile the statemnts silently. I think that, in cases... (more) |
— | almost 4 years ago |