请教一个关于atexit( )函数的问题。
#include <stdio.h>#include <stdlib.h>
void sign_off(void);
void too_bad(void);
int main(void)
{
int n;
atexit(sign_off);
puts("Enter an integer:");
if(scanf("%d",&n)!=1)
{
puts("That's no integer!");
atexit(too_bad);
exit(EXIT_FAILURE);
}
printf("%d is %s.\n",n,(n%2==0)?"even":"odd");
system("pause");
return 0;
}
void sign_off(void)
{
puts("Thus terminates another magnificent program from");
puts("SeeSaw Software!");
}
void too_bad(void)
{
puts("SeeSaw software extends its heartfelt condolences");
puts("to you upon the failure of your program.");
}
在IDE 中运行该程序时,可能看不到最后2行输出。
运行结果:
Enter an integer:
212
212 is even
Thus terminates another magnificent program from
SeeSaw Software!
我想请问一下,这里的“IDE”指的是什么意思呀!而我的就是看不到最后2行输出。