I have a problem related with this code.
#include <stdio.h>
void main()
{
char array[0];
scanf("%s", array);
printf("%s", array);
return;
}
when I enter data in input-field it get store in array and output is obtained but it's size is 0.
and another thing happens is that when I enter suppose 'a' 12-times then somehow controls reaches to scanf()
for taking input and again on entering 'a' 12-times control again reaches to scanf()
and this goes on until I enter less than 12 character.
if on entering greater than 12 characters the program crashes.
Why this happens?