the code written below copies string from one array to another and i have declared the both arrays as static and i have given the size of the second array as '1' while the string size which is to be copied is greater than the size i have provided to the second array,still the program is running without any error and also coping the whole sting string and displaying it. if both the arrays are static then the size of second array 't' is increasing so that the it can holds the whole string.
#include<stdio.h>
void main()
{
char c[]="hello";
char t[1];
int i;
for(i=0;c[i]!='\0';i++)
{
t[i]=c[i];
}
t[i]='\0';
printf("%s",t);
}