In the program below, if I enter "sbsbsbsbssbsbsbsbsbsbsbsbsbsbs" or even more characters, this program works and prints the value. Can someone please explain why?
int main()
{
char *s = strdup("");
scanf("%s",s);
printf("\nInput:\t%s\n",s);
return 0;
}
Thanks