I tried testing a normal string input and output before proceeding to higher levels including creating a datatype for taking large values of numbers. What I find out here is as you can see even though the string is limited in taking 5 characters, it takes as much as I can feed it and shows the full too. I don't know what the problem is, if it is some kind of compiler error. I thought restarting might solve the problem so I restarted the IDE as well as the PC but no luck. I asked my friends about it and showed the code, the same happened for them too. I could find no answers on the internet about it. I use Atom IDE updated to the latest version. Hope someone could help me...I need it real quick cause I need that custom datatype for my Semester Assignment.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
char i[5];
scanf("%s", &i);
printf("%s", i);
}