You are not getting a compiler error because the syntax is correct. What is wrong is the logic and what you get is undefined behavior because you are writing to memory at the end of the buffer.
Why is this behavior undefined? Well, you did not allocate this memory, which means that it does not belong to you - you are invading an area that is closed with caution tape. Think about whether your program uses memory immediately after the buffer. You overwrote this memory because you overloaded your buffer.
:
scanf("%9s", aString);
.