背化学元素周期表:这段c程序为什么不能在tc2下运行,急!!!

来源:百度文库 编辑:中科新闻网 时间:2024/05/06 18:51:31
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>

void main()
{
char xx[2][80]={"i am a student","what happen?"};
int i,j;
char word[20],yy[80],zz[80],*p;
for(i=0;i<2;i++)
{
p=xx[i];
j=0;
memset(word,0,21);
memset(yy,0,80);
while(*p)
{
if(isalpha(*p))
{
word[j++]=*p++;
if(isalpha(*p)) continue;
}
strcpy(zz,yy);
word[j]=' ';
strcpy(yy,word);
strcat(yy,zz);
j=0;
memset(word,0,21);
while(*p&&(!isalpha(*p))) p++;
}
strcpy(xx[i],yy);
}
printf("%s\n\%s\n",xx[0],xx[1]);
getch();
}
这是从三级模拟考试试卷上修改出来的,在vc下运行都没问题 改到考试的用的turboc2下运行却怎么也运行不出来。什么错误也没有提示,就光标在动什么也没输出。本周六就考试,望有人能给出解答!不尽感谢!!!
tc下能运行“helloworld”的简单程序,就是不能运行这个程序。如果这个程序不能在tc下运行,至少也提示个什么错误吧,况且参考书上很多程序都跟这个程序差不多。

是不是tc没弄好??
tc其它程序能运行么??

这应该是c++的程序,tc不支持。