可以调用系统命令,如system("pause"),可以使程序暂停,保持窗口显示,否则程序就立刻退出了
system("cls")
是在c语言程序中,调用系统命令cls完成清屏操作。
system函数是c语言提供的与操作系统衔接的函数,函数原型如下:
#include
//所在头文件
int
system(const
char
*command);
//参数为操作系统命令
函数功能:execute
a
shell
command
执行一个操作系统命令
如:
system("time
/t")
;显示时间
system("dir");
//列目录