Hello,
I'm wondering why is the following code working (although it shouldnt):
It will print answer normally.Code:#include <stdio.h> #include <stdlib.h> #include <string.h> main() { char answer[1]; printf("question? "); scanf("%s",answer); printf("%s",answer); }
Why is that?
Thanks for explanation!