void f()
{
static char *theTxt;

strcpy(theTxt,"TEST¥n");
printf("%s",theTxt);
}
これってtheTxt;がstaticでnull初期化されているから
駄目なんですか?